paascorb commited on
Commit
37b8005
1 Parent(s): 8e925f2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -35,7 +35,7 @@ def do_ask(question, button, dataset):
35
  path = row['filepath']
36
  text = Path(f'{path}').read_text()
37
  question_answerer = pipeline("question-answering", model='distilbert-base-cased-distilled-squad')
38
- return question_answerer(question, context=text)
39
  else:
40
  return ""
41
 
 
35
  path = row['filepath']
36
  text = Path(f'{path}').read_text()
37
  question_answerer = pipeline("question-answering", model='distilbert-base-cased-distilled-squad')
38
+ return question_answerer(question, context=text)['answer']
39
  else:
40
  return ""
41