Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -31,11 +31,11 @@ def generate_graph_from_code(code):
|
|
31 |
img = Image.open(buf)
|
32 |
return img
|
33 |
|
34 |
-
# Define the Gradio interface
|
35 |
interface = gr.Interface(
|
36 |
fn=generate_graph_from_code,
|
37 |
-
inputs=gr.
|
38 |
-
outputs=gr.
|
39 |
title="Python Code to Graph Generator",
|
40 |
description="Paste Python code that defines a variable `multiplier` to generate a graph."
|
41 |
)
|
|
|
31 |
img = Image.open(buf)
|
32 |
return img
|
33 |
|
34 |
+
# Define the Gradio interface using the updated API
|
35 |
interface = gr.Interface(
|
36 |
fn=generate_graph_from_code,
|
37 |
+
inputs=gr.Textbox(lines=10, placeholder="Paste your Python code here", label="Python Code"),
|
38 |
+
outputs=gr.Image(type="pil", label="Generated Graph"),
|
39 |
title="Python Code to Graph Generator",
|
40 |
description="Paste Python code that defines a variable `multiplier` to generate a graph."
|
41 |
)
|