arpitneema commited on
Commit
2e0f0bc
1 Parent(s): 2d0b02d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -9
app.py CHANGED
@@ -36,12 +36,10 @@ def predict(input, history=[]):
36
  return response, history
37
 
38
 
39
- gr.Interface(
40
- fn=predict,
41
- title=title,
42
- description=description,
43
- examples=examples,
44
- inputs=["text", "state"],
45
- outputs=["chatbot", "state"],
46
- theme="finlaymacklon/boxy_violet",
47
- ).launch(`share=True`)
 
36
  return response, history
37
 
38
 
39
+ def func(context, question):
40
+ result = nlp(question = question, context=context)
41
+ return result['answer']
42
+
43
+ app = gr.Interface(fn=func, inputs = ['textbox', 'text'], outputs = 'textbox', title = 'Question Answering bot', theme = 'dark-grass', description = 'Input context and question, then get answers!')
44
+
45
+ app.launch(inline=False)