Abhishek0323 commited on
Commit
73f96a4
·
verified ·
1 Parent(s): cd72bd6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -17,11 +17,11 @@ def answer_question(context, question):
17
  result = nlp(question=question, context=context)
18
  return result['answer']
19
 
20
- # Define the Gradio interface
21
  iface = gr.Interface(fn=answer_question,
22
- inputs=[gr.inputs.Textbox(label="Context", placeholder="Enter the text here..."),
23
- gr.inputs.Textbox(label="Question", placeholder="Enter your question here...")],
24
- outputs=gr.outputs.Textbox(label="Answer"),
25
  title="Question and Answer Assistant",
26
  description="Provide a context and ask a question based on that context. The assistant will find the answer for you.")
27
 
 
17
  result = nlp(question=question, context=context)
18
  return result['answer']
19
 
20
+ # Define the Gradio interface with the updated API
21
  iface = gr.Interface(fn=answer_question,
22
+ inputs=[gr.Textbox(label="Context", placeholder="Enter the text here...", lines=7),
23
+ gr.Textbox(label="Question", placeholder="Enter your question here...")],
24
+ outputs=gr.Textbox(label="Answer"),
25
  title="Question and Answer Assistant",
26
  description="Provide a context and ask a question based on that context. The assistant will find the answer for you.")
27