Spaces:
Sleeping
Sleeping
File size: 639 Bytes
8594ebc 440345a 8594ebc 7e52e17 8594ebc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# import gradio as gr
# gr.load("models/DevBM/t5-large-squad").launch()
import gradio as gr
# Define the input and output interfaces
inputs = gr.inputs.Textbox(label="Question")
output = gr.outputs.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?", ""]
]
# Load your model
model = gr.load("models/DevBM/t5-large-squad")
# Launch the Gradio interface with examples
gr.Interface(fn=model.predict, inputs=inputs, outputs=output, examples=examples).launch()
|