Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -29,7 +29,7 @@ def do_ask(question, button, dataset):
|
|
| 29 |
global docs
|
| 30 |
docs_ready = dataset.iloc[-1, 0] != ""
|
| 31 |
if button == "✨Listo✨" and docs_ready:
|
| 32 |
-
path = dataset["filepath"]
|
| 33 |
txt = Path(f'{path}').read_text()
|
| 34 |
question_answerer = pipeline("question-answering", model='distilbert-base-cased-distilled-squad')
|
| 35 |
return question_answerer(question, context=text)
|
|
|
|
| 29 |
global docs
|
| 30 |
docs_ready = dataset.iloc[-1, 0] != ""
|
| 31 |
if button == "✨Listo✨" and docs_ready:
|
| 32 |
+
path = dataset[0]["filepath"]
|
| 33 |
txt = Path(f'{path}').read_text()
|
| 34 |
question_answerer = pipeline("question-answering", model='distilbert-base-cased-distilled-squad')
|
| 35 |
return question_answerer(question, context=text)
|