Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,10 +11,10 @@ def generate_answer(context, question):
|
|
| 11 |
|
| 12 |
# Define the Gradio interface
|
| 13 |
inputs = [
|
| 14 |
-
gr.
|
| 15 |
-
gr.
|
| 16 |
]
|
| 17 |
-
outputs = gr.
|
| 18 |
|
| 19 |
title = "Question Answering with Hugging Face"
|
| 20 |
description = "Answer questions based on a given context using Hugging Face's question answering model"
|
|
@@ -22,4 +22,4 @@ description = "Answer questions based on a given context using Hugging Face's qu
|
|
| 22 |
iface = gr.Interface(fn=generate_answer, inputs=inputs, outputs=outputs, title=title, description=description)
|
| 23 |
|
| 24 |
# Launch the Gradio app
|
| 25 |
-
iface.launch()
|
|
|
|
| 11 |
|
| 12 |
# Define the Gradio interface
|
| 13 |
inputs = [
|
| 14 |
+
gr.components.Textbox(label="Enter some context"),
|
| 15 |
+
gr.components.Textbox(label="Enter a question")
|
| 16 |
]
|
| 17 |
+
outputs = gr.components.Textbox(label="Answer")
|
| 18 |
|
| 19 |
title = "Question Answering with Hugging Face"
|
| 20 |
description = "Answer questions based on a given context using Hugging Face's question answering model"
|
|
|
|
| 22 |
iface = gr.Interface(fn=generate_answer, inputs=inputs, outputs=outputs, title=title, description=description)
|
| 23 |
|
| 24 |
# Launch the Gradio app
|
| 25 |
+
iface.launch()
|