Spaces:
Running
on
T4
Running
on
T4
Upload gradio_app.py
Browse files- gradio_app.py +45 -2
gradio_app.py
CHANGED
@@ -31,7 +31,48 @@ from hy3dgen.shapegen.utils import logger
|
|
31 |
|
32 |
MAX_SEED = 1e7
|
33 |
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
if True:
|
37 |
import os
|
@@ -39,6 +80,8 @@ if True:
|
|
39 |
import subprocess
|
40 |
import sys
|
41 |
import shlex
|
|
|
|
|
42 |
print("cd /home/user/app/hy3dgen/texgen/differentiable_renderer/ && bash compile_mesh_painter.sh")
|
43 |
os.system("cd /home/user/app/hy3dgen/texgen/differentiable_renderer/ && bash compile_mesh_painter.sh")
|
44 |
print('install custom')
|
@@ -344,7 +387,7 @@ def build_app():
|
|
344 |
"""
|
345 |
|
346 |
#gr.themes.Base()
|
347 |
-
with gr.Blocks(theme=
|
348 |
gr.HTML(title_html)
|
349 |
|
350 |
with gr.Row():
|
|
|
31 |
|
32 |
MAX_SEED = 1e7
|
33 |
|
34 |
+
force_dark_theme = gr.themes.Base().set(
|
35 |
+
background_fill_primary='*neutral_950',
|
36 |
+
background_fill_secondary='*neutral_900',
|
37 |
+
block_background_fill='*neutral_800',
|
38 |
+
block_label_background_fill='*background_fill_secondary',
|
39 |
+
block_label_text_color='*neutral_200',
|
40 |
+
block_title_text_color='*neutral_200',
|
41 |
+
body_text_color='*neutral_100',
|
42 |
+
border_color_accent='*primary_600',
|
43 |
+
border_color_primary='*neutral_700',
|
44 |
+
button_cancel_text_color_hover='white',
|
45 |
+
button_primary_background_fill='*primary_600',
|
46 |
+
button_primary_background_fill_hover='*primary_700',
|
47 |
+
button_primary_border_color='*primary_600',
|
48 |
+
button_secondary_background_fill='*neutral_600',
|
49 |
+
button_secondary_background_fill_hover='*neutral_700',
|
50 |
+
button_secondary_border_color='*neutral_600',
|
51 |
+
button_secondary_border_color_hover='*neutral_500',
|
52 |
+
button_secondary_text_color='white',
|
53 |
+
checkbox_background_color='*neutral_800',
|
54 |
+
checkbox_border_color='*neutral_700',
|
55 |
+
checkbox_border_color_hover='*neutral_600',
|
56 |
+
code_background_fill='*neutral_800',
|
57 |
+
color_accent='*primary_700',
|
58 |
+
color_accent_soft='*neutral_700',
|
59 |
+
error_background_fill='*background_fill_primary',
|
60 |
+
error_border_color='#ef4444',
|
61 |
+
error_icon_color='#ef4444',
|
62 |
+
error_text_color='#fef2f2',
|
63 |
+
input_background_fill='*neutral_700',
|
64 |
+
input_border_color_focus='*neutral_700',
|
65 |
+
input_placeholder_color='*neutral_500',
|
66 |
+
link_text_color='*secondary_500',
|
67 |
+
link_text_color_active='*secondary_500',
|
68 |
+
link_text_color_hover='*secondary_400',
|
69 |
+
link_text_color_visited='*secondary_600',
|
70 |
+
shadow_spread='1px',
|
71 |
+
stat_background_fill='*primary_500',
|
72 |
+
table_border_color='*neutral_700',
|
73 |
+
table_even_background_fill='neutral_950',
|
74 |
+
table_odd_background_fill='*neutral_900'
|
75 |
+
)
|
76 |
|
77 |
if True:
|
78 |
import os
|
|
|
80 |
import subprocess
|
81 |
import sys
|
82 |
import shlex
|
83 |
+
|
84 |
+
print(f"gradio version: {gr.__version__}")
|
85 |
print("cd /home/user/app/hy3dgen/texgen/differentiable_renderer/ && bash compile_mesh_painter.sh")
|
86 |
os.system("cd /home/user/app/hy3dgen/texgen/differentiable_renderer/ && bash compile_mesh_painter.sh")
|
87 |
print('install custom')
|
|
|
387 |
"""
|
388 |
|
389 |
#gr.themes.Base()
|
390 |
+
with gr.Blocks(theme=force_dark_theme, title='3DMarket-3D-2.0', analytics_enabled=False, css=custom_css) as demo:
|
391 |
gr.HTML(title_html)
|
392 |
|
393 |
with gr.Row():
|