Sugamdeol commited on
Commit
9afbe58
·
verified ·
1 Parent(s): c1d2267

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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.inputs.Textbox(lines=10, placeholder="Paste your Python code here", label="Python Code"),
38
- outputs=gr.outputs.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
  )
 
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
  )