arpitneema
commited on
Commit
•
2e0f0bc
1
Parent(s):
2d0b02d
Update app.py
Browse files
app.py
CHANGED
@@ -36,12 +36,10 @@ def predict(input, history=[]):
|
|
36 |
return response, history
|
37 |
|
38 |
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
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)
|
|
|
|