NihalGazi commited on
Commit
da97bea
·
verified ·
1 Parent(s): 01e50ae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -9
app.py CHANGED
@@ -23,12 +23,13 @@ def render_model(blend_file):
23
  subprocess.run(render_command.split())
24
  return output_file
25
 
26
- iface = gr.Interface(
27
- fn=render_model,
28
- inputs="file",
29
- outputs="image",
30
- title="Blender Rendering with Gradio",
31
- description="Upload your Blender file (.blend) to render an image.",
32
- theme="compact"
33
- )
34
- iface.launch()
 
 
23
  subprocess.run(render_command.split())
24
  return output_file
25
 
26
+ def render_interface():
27
+ with gr.Interface(
28
+ fn=render_model,
29
+ inputs=gr.inputs.File(label="Upload your .blend file"),
30
+ outputs=gr.outputs.Image(label="Rendered Image")
31
+ ) as iface:
32
+ iface.launch()
33
+
34
+ if __name__ == "__main__":
35
+ render_interface()