Spaces:
Sleeping
Sleeping
File size: 535 Bytes
f1ae702 b338e3a f1ae702 b338e3a f1ae702 b338e3a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
import gradio as gr
# Load your model
model = gr.Interface.load("models/DevBM/t5-large-squad")
# Define the input and output interfaces
inputs = gr.Textbox(label="Question")
outputs = gr.Textbox(label="Answer")
# Define examples that users can select from
examples = [
["What is the capital of France?", ""],
["Who wrote the Harry Potter series?", ""],
["What is the largest planet in our solar system?", ""]
]
# Launch the Gradio interface with examples
model.launch(inputs=inputs, outputs=outputs, examples=examples)
|