John6666 commited on
Commit
ea6c1f3
·
verified ·
1 Parent(s): 7a8e2d5

Upload gradio_app.py

Browse files
Files changed (1) hide show
  1. gradio_app.py +2 -2
gradio_app.py CHANGED
@@ -18,7 +18,7 @@ def generate_and_process_3d(image: Image.Image) -> tuple[str | None, str | None]
18
  unique_id = str(uuid.uuid4())
19
  filename = f'model_{unique_id}.glb'
20
  output_path = os.path.join(OUTPUT_DIR, filename)
21
- public_url = f"https://john6666-image-to-3d-test2.hf.space/file={output_path}"
22
  image_path = "image.png"
23
  image.save(image_path)
24
  shutil.copy(image_path, output_path)
@@ -56,4 +56,4 @@ with gr.Blocks() as demo:
56
  )
57
 
58
  if __name__ == "__main__":
59
- demo.queue().launch(ssr_mode=False, allowed_paths=[OUTPUT_DIR])
 
18
  unique_id = str(uuid.uuid4())
19
  filename = f'model_{unique_id}.glb'
20
  output_path = os.path.join(OUTPUT_DIR, filename)
21
+ public_url = f"https://john6666-image-to-3d-test2.hf.space/file={Path(output_path).resolve()}"
22
  image_path = "image.png"
23
  image.save(image_path)
24
  shutil.copy(image_path, output_path)
 
56
  )
57
 
58
  if __name__ == "__main__":
59
+ demo.queue().launch(ssr_mode=False, allowed_paths=[Path(OUTPUT_DIR).resolve()])