anzorq commited on
Commit
1723973
1 Parent(s): 5af4728

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -6
app.py CHANGED
@@ -31,7 +31,7 @@ def get_state():
31
  return state
32
 
33
  set_state('Creating txt2mesh model...')
34
- t2m_name = 'base40M-textvec' # 'base40M'
35
  t2m_model = model_from_config(MODEL_CONFIGS[t2m_name], device)
36
  t2m_model.eval()
37
  base_diffusion_t2m = diffusion_from_config(DIFFUSION_CONFIGS[t2m_name])
@@ -250,19 +250,21 @@ with gr.Blocks() as app:
250
  ["a man"],
251
  ],
252
  inputs=[prompt],
 
253
  fn=generate_3D,
254
- cache_examples=False
255
  )
256
 
257
  gr.Examples(
258
  examples=[
259
- ["corgi.png"],
260
- ["cube_stack.jpg"],
261
- ["chair.png"],
262
  ],
263
  inputs=[img],
 
264
  fn=generate_3D,
265
- cache_examples=False
266
  )
267
 
268
  # app.load(get_state, inputs=[], outputs=state_info, every=0.5, show_progress=False)
 
31
  return state
32
 
33
  set_state('Creating txt2mesh model...')
34
+ t2m_name = 'base40M-textvec'
35
  t2m_model = model_from_config(MODEL_CONFIGS[t2m_name], device)
36
  t2m_model.eval()
37
  base_diffusion_t2m = diffusion_from_config(DIFFUSION_CONFIGS[t2m_name])
 
250
  ["a man"],
251
  ],
252
  inputs=[prompt],
253
+ outputs=outputs,
254
  fn=generate_3D,
255
+ cache_examples=True
256
  )
257
 
258
  gr.Examples(
259
  examples=[
260
+ ["images/corgi.png"],
261
+ ["images/cube_stack.jpg"],
262
+ ["images/chair.png"],
263
  ],
264
  inputs=[img],
265
+ outputs=outputs,
266
  fn=generate_3D,
267
+ cache_examples=True
268
  )
269
 
270
  # app.load(get_state, inputs=[], outputs=state_info, every=0.5, show_progress=False)