TNK21 commited on
Commit
92d92e2
·
1 Parent(s): 833b979

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -11,10 +11,10 @@ def generate_answer(context, question):
11
 
12
  # Define the Gradio interface
13
  inputs = [
14
- gr.inputs.Textbox(label="Enter some context"),
15
- gr.inputs.Textbox(label="Enter a question")
16
  ]
17
- outputs = gr.outputs.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,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()