Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,11 +1,11 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
# Load your model
|
| 4 |
-
model = gr.load("models/DevBM/t5-large-squad")
|
| 5 |
|
| 6 |
# Define the input and output interfaces
|
| 7 |
-
inputs = gr.
|
| 8 |
-
|
| 9 |
|
| 10 |
# Define examples that users can select from
|
| 11 |
examples = [
|
|
@@ -15,4 +15,4 @@ examples = [
|
|
| 15 |
]
|
| 16 |
|
| 17 |
# Launch the Gradio interface with examples
|
| 18 |
-
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
# Load your model
|
| 4 |
+
model = gr.Interface.load("models/DevBM/t5-large-squad")
|
| 5 |
|
| 6 |
# Define the input and output interfaces
|
| 7 |
+
inputs = gr.Textbox(label="Question")
|
| 8 |
+
outputs = gr.Textbox(label="Answer")
|
| 9 |
|
| 10 |
# Define examples that users can select from
|
| 11 |
examples = [
|
|
|
|
| 15 |
]
|
| 16 |
|
| 17 |
# Launch the Gradio interface with examples
|
| 18 |
+
model.launch(inputs=inputs, outputs=outputs, examples=examples)
|