Walid-Ahmed commited on
Commit
d399ffa
·
verified ·
1 Parent(s): feb20ce

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -3,8 +3,8 @@ from transformers import pipeline
3
  import chardet
4
 
5
  # Initialize the question-answering pipeline
6
- qa_pipeline = pipeline("question-answering",model="deepset/roberta-base-squad2")
7
-
8
  def answer_question(context, question):
9
  result = qa_pipeline(question=question, context=context)
10
  return result['answer']
 
3
  import chardet
4
 
5
  # Initialize the question-answering pipeline
6
+ #qa_pipeline = pipeline("question-answering",model="deepset/roberta-base-squad2")
7
+ question_answer = pipeline("question-answering",model="distilbert-base-cased-distilled-squad")
8
  def answer_question(context, question):
9
  result = qa_pipeline(question=question, context=context)
10
  return result['answer']