paulpanwang commited on
Commit
aeba29c
·
verified ·
1 Parent(s): e60a007
Files changed (1) hide show
  1. app.py +8 -16
app.py CHANGED
@@ -113,7 +113,7 @@ _DESCRIPTION = '''
113
  * Upload an image and click "Generate" to create a 3D asset. If the image has alpha channel, it be used as the mask. Otherwise, we use `rembg` to remove the background.
114
  '''
115
 
116
- block = gr.Blocks(title=_TITLE).queue()
117
  with block:
118
  with gr.Row():
119
  with gr.Column(scale=1):
@@ -157,28 +157,20 @@ with block:
157
 
158
  gr.Examples(
159
  examples=[
160
- f'assets/diffsplat/{image}'
161
- for image in os.listdir("assets/diffsplat") if image.endswith('.png')
162
  ],
163
- inputs=[input_image],
164
- outputs=[output_image, output_video, output_file],
165
- fn=lambda x: process(input_image=x),
166
- # run_on_click=True,
167
- cache_examples=True,
168
  label='Image-to-3D Examples'
169
  )
170
 
171
  gr.Examples(
172
  examples=[
173
- "a_toy_robot",
174
- "a_cute_panda",
175
- "an_ancient_leather-bound_book"
176
  ],
177
- inputs=[input_text],
178
- outputs=[output_image, output_video, output_file],
179
- fn=lambda x: process(input_image=None, prompt=x),
180
- # run_on_click=True,
181
- cache_examples=True,
182
  label='Text-to-3D Examples'
183
  )
184
 
 
113
  * Upload an image and click "Generate" to create a 3D asset. If the image has alpha channel, it be used as the mask. Otherwise, we use `rembg` to remove the background.
114
  '''
115
 
116
+ block = gr.Blocks(title=_TITLE)
117
  with block:
118
  with gr.Row():
119
  with gr.Column(scale=1):
 
157
 
158
  gr.Examples(
159
  examples=[
160
+ [f'assets/diffsplat/{image}', "a_high_quality_3D_asset"]
161
+ for image in os.listdir("assets/diffsplat") if image.endswith('.png')
162
  ],
163
+ inputs=[input_image, input_text],
 
 
 
 
164
  label='Image-to-3D Examples'
165
  )
166
 
167
  gr.Examples(
168
  examples=[
169
+ ["a_toy_robot", None],
170
+ ["a_cute_panda", None],
171
+ ["an_ancient_leather-bound_book", None]
172
  ],
173
+ inputs=[input_text, input_image],
 
 
 
 
174
  label='Text-to-3D Examples'
175
  )
176