Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|
| 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="
|
| 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
|