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