kylebrodeur commited on
Commit
6141c9f
·
verified ·
1 Parent(s): 29dfabd

debug: test with gr.Interface instead of gr.Blocks

Browse files
Files changed (1) hide show
  1. app.py +1 -6
app.py CHANGED
@@ -3,12 +3,7 @@ import gradio as gr
3
  def echo(text):
4
  return f"Echo: {text}"
5
 
6
- with gr.Blocks(title="Minimal Test") as demo:
7
- gr.Markdown("# Minimal Test")
8
- inp = gr.Textbox(label="Input")
9
- out = gr.Textbox(label="Output")
10
- btn = gr.Button("Submit")
11
- btn.click(fn=echo, inputs=inp, outputs=out)
12
 
13
  if __name__ == "__main__":
14
  demo.launch()
 
3
  def echo(text):
4
  return f"Echo: {text}"
5
 
6
+ demo = gr.Interface(fn=echo, inputs="text", outputs="text", title="Interface Test")
 
 
 
 
 
7
 
8
  if __name__ == "__main__":
9
  demo.launch()