bartduis commited on
Commit
267f374
·
verified ·
1 Parent(s): c5279d4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -13
app.py CHANGED
@@ -206,19 +206,20 @@ def process_image(input_img):
206
  # print(input_glb)
207
  return input_glb, inference_glb
208
 
209
- gr.Markdown("""
210
- ## Image to 3D in cluttered scene with [RaySt3R](https://rayst3r.github.io/)
211
- * Upload an image and click submit.
212
- * We mask the input using [Rembg](https://github.com/danielgatis/rembg) and generate depth with [MoGe](https://github.com/microsoft/MoGe).
213
- * The input point cloud will be visible in 'input', the output is visible in the "RaySt3R" section.
214
-
215
- [Project Website](https://rayst3r.github.io/)
216
- """)
217
- demo = gr.Interface(
218
- process_image,
219
- gr.Image(),
220
- [gr.Model3D(label="Input"), gr.Model3D(label="RaySt3R",)]
221
- )
 
222
 
223
  if __name__ == "__main__":
224
  dummy_warmup()
 
206
  # print(input_glb)
207
  return input_glb, inference_glb
208
 
209
+ with gr.Blocks(delete_cache=(600, 600)) as demo:
210
+ gr.Markdown("""
211
+ ## Image to 3D in cluttered scene with [RaySt3R](https://rayst3r.github.io/)
212
+ * Upload an image and click submit.
213
+ * We mask the input using [Rembg](https://github.com/danielgatis/rembg) and generate depth with [MoGe](https://github.com/microsoft/MoGe).
214
+ * The input point cloud will be visible in 'input', the output is visible in the "RaySt3R" section.
215
+
216
+ [Project Website](https://rayst3r.github.io/)
217
+ """)
218
+ gr.Interface(
219
+ process_image,
220
+ gr.Image(),
221
+ [gr.Model3D(label="Input"), gr.Model3D(label="RaySt3R",)]
222
+ )
223
 
224
  if __name__ == "__main__":
225
  dummy_warmup()