Spaces:
Runtime error
Runtime error
Omar Sanseviero
commited on
Commit
·
61783d6
1
Parent(s):
d6bb90c
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
|
| 3 |
+
def predict(context, question):
|
| 4 |
+
return {"wrong": "output format"}
|
| 5 |
+
|
| 6 |
+
title = "Gadio with error"
|
| 7 |
+
description = "Gradio with error."
|
| 8 |
+
|
| 9 |
+
iface = gr.Interface(fn=predict,
|
| 10 |
+
inputs=[gr.inputs.Textbox(label="context"), gr.inputs.Textbox(label="question")],
|
| 11 |
+
outputs='text',
|
| 12 |
+
title=title,
|
| 13 |
+
description=description,
|
| 14 |
+
examples=[["My name is Omar and I live in Mexico", "Where does Omar live?"]],
|
| 15 |
+
enable_queue=True)
|
| 16 |
+
|
| 17 |
+
iface.launch()
|