ivyblossom commited on
Commit
c7c4e48
·
1 Parent(s): e776a42

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -9,7 +9,11 @@ import tempfile
9
  def question_answering(questions, pdf_text):
10
  # Perform question-answering using Hugging Face's Transformers
11
  question_answerer = pipeline("question-answering", model="distilbert-base-cased-distilled-squad", tokenizer="distilbert-base-cased-distilled-squad")
12
- answers = question_answerer(question=questions, context=pdf_text)
 
 
 
 
13
 
14
  return answers
15
 
 
9
  def question_answering(questions, pdf_text):
10
  # Perform question-answering using Hugging Face's Transformers
11
  question_answerer = pipeline("question-answering", model="distilbert-base-cased-distilled-squad", tokenizer="distilbert-base-cased-distilled-squad")
12
+
13
+ answers = []
14
+ for question in questions:
15
+ answer = question_answerer(question=question, context=pdf_text)
16
+ answers.append(answer)
17
 
18
  return answers
19