Vvaann commited on
Commit
af71d27
·
verified ·
1 Parent(s): 549b7da

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -9,14 +9,14 @@ def render_3d_scene(radius):
9
  output_image_path = "sphere.png"
10
  show(sphere, offscreen=True).screenshot(output_image_path)
11
 
12
- # Return the image path
13
  return output_image_path
14
 
15
  # Create a Gradio interface
16
  interface = gr.Interface(
17
  fn=render_3d_scene,
18
  inputs=gr.Slider(0.1, 2.0, value=1.0, step=0.1, label="Sphere Radius"),
19
- outputs=gr.Image(type="file", label="3D Sphere")
20
  )
21
 
22
  # Launch the app
 
9
  output_image_path = "sphere.png"
10
  show(sphere, offscreen=True).screenshot(output_image_path)
11
 
12
+ # Return the file path of the rendered image
13
  return output_image_path
14
 
15
  # Create a Gradio interface
16
  interface = gr.Interface(
17
  fn=render_3d_scene,
18
  inputs=gr.Slider(0.1, 2.0, value=1.0, step=0.1, label="Sphere Radius"),
19
+ outputs=gr.Image(type="filepath", label="3D Sphere") # Changed 'type' to 'filepath'
20
  )
21
 
22
  # Launch the app