Spaces:
Running on Zero
Running on Zero
debug: test with gr.Interface instead of gr.Blocks
Browse files
app.py
CHANGED
|
@@ -3,12 +3,7 @@ import gradio as gr
|
|
| 3 |
def echo(text):
|
| 4 |
return f"Echo: {text}"
|
| 5 |
|
| 6 |
-
|
| 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()
|