import gradio as gr # Load your model model = gr.load("models/DevBM/t5-large-squad") # 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?", ""] ] # Launch the Gradio interface with examples gr.Interface(fn=model.predict, inputs=inputs, outputs=output, examples=examples).launch()