Spaces:
Running
on
Zero
Running
on
Zero
Enabled MultiView Prompt tab
Browse files- gradio_app.py +3 -3
gradio_app.py
CHANGED
@@ -863,14 +863,14 @@ def build_app():
|
|
863 |
with gr.Row():
|
864 |
with gr.Column(scale=3):
|
865 |
with gr.Tabs(selected='tab_img_prompt') as tabs_prompt:
|
866 |
-
with gr.Tab('Image Prompt', id='tab_img_prompt', visible=
|
867 |
image = gr.Image(label='Image', type='pil', image_mode='RGBA', height=290)
|
868 |
caption = gr.State(None)
|
869 |
# with gr.Tab('Text Prompt', id='tab_txt_prompt', visible=HAS_T2I and not MV_MODE) as tab_tp:
|
870 |
# caption = gr.Textbox(label='Text Prompt',
|
871 |
# placeholder='HunyuanDiT will be used to generate image.',
|
872 |
# info='Example: A 3D model of a cute cat, white background')
|
873 |
-
with gr.Tab('MultiView Prompt', visible=
|
874 |
# gr.Label('Please upload at least one front image.')
|
875 |
with gr.Row():
|
876 |
mv_image_front = gr.Image(label='Front', type='pil', image_mode='RGBA', height=140,
|
@@ -1125,7 +1125,7 @@ if __name__ == '__main__':
|
|
1125 |
os.makedirs(SAVE_DIR, exist_ok=True)
|
1126 |
|
1127 |
CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))
|
1128 |
-
MV_MODE =
|
1129 |
TURBO_MODE = 'turbo' in args.subfolder
|
1130 |
|
1131 |
HTML_HEIGHT = 690 if MV_MODE else 650
|
|
|
863 |
with gr.Row():
|
864 |
with gr.Column(scale=3):
|
865 |
with gr.Tabs(selected='tab_img_prompt') as tabs_prompt:
|
866 |
+
with gr.Tab('Image Prompt', id='tab_img_prompt', visible=True) as tab_ip:
|
867 |
image = gr.Image(label='Image', type='pil', image_mode='RGBA', height=290)
|
868 |
caption = gr.State(None)
|
869 |
# with gr.Tab('Text Prompt', id='tab_txt_prompt', visible=HAS_T2I and not MV_MODE) as tab_tp:
|
870 |
# caption = gr.Textbox(label='Text Prompt',
|
871 |
# placeholder='HunyuanDiT will be used to generate image.',
|
872 |
# info='Example: A 3D model of a cute cat, white background')
|
873 |
+
with gr.Tab('MultiView Prompt', visible=True) as tab_mv:
|
874 |
# gr.Label('Please upload at least one front image.')
|
875 |
with gr.Row():
|
876 |
mv_image_front = gr.Image(label='Front', type='pil', image_mode='RGBA', height=140,
|
|
|
1125 |
os.makedirs(SAVE_DIR, exist_ok=True)
|
1126 |
|
1127 |
CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))
|
1128 |
+
MV_MODE = True # Force multi-view mode to be enabled
|
1129 |
TURBO_MODE = 'turbo' in args.subfolder
|
1130 |
|
1131 |
HTML_HEIGHT = 690 if MV_MODE else 650
|