arunslb123 commited on
Commit
f1f71c3
·
1 Parent(s): 24ddefc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -1,13 +1,13 @@
1
  import gradio as gr
2
- from transformers import pipeline
 
 
 
3
 
4
- model_checkpoint = "arunslb123/bert"
5
- question_answerer = pipeline("question-answering", model=model_checkpoint)
 
6
 
7
- def answer_question(context, question):
8
- answer = question_answerer(question=question, context=context)
9
- return answer['answer']
10
-
11
- iface = gr.Interface(fn=answer_question,
12
- inputs=["textbox", "textbox"],
13
- outputs="text")
 
1
  import gradio as gr
2
+ # from transformers import pipeline
3
+ gr.Interface.load("models/arunslb123/bert").launch()
4
+ # model_checkpoint = "arunslb123/bert"
5
+ # question_answerer = pipeline("question-answering", model=model_checkpoint)
6
 
7
+ # def answer_question(context, question):
8
+ # answer = question_answerer(question=question, context=context)
9
+ # return answer['answer']
10
 
11
+ # iface = gr.Interface(fn=answer_question,
12
+ # inputs=["textbox", "textbox"],
13
+ # outputs="text")