Spaces:
Sleeping
Sleeping
Commit
·
2ae3da8
1
Parent(s):
72fbd66
fixing warning
Browse files
main.py
CHANGED
|
@@ -56,10 +56,10 @@ class Question(BaseModel):
|
|
| 56 |
@app.post("/predict")
|
| 57 |
async def predict(question: Question):
|
| 58 |
context = retrieve_context(question.query)
|
| 59 |
-
result = qa_pipeline(
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
return {"answer": result["answer"]}
|
| 64 |
|
| 65 |
@app.get("/")
|
|
|
|
| 56 |
@app.post("/predict")
|
| 57 |
async def predict(question: Question):
|
| 58 |
context = retrieve_context(question.query)
|
| 59 |
+
result = qa_pipeline(
|
| 60 |
+
question=question.query,
|
| 61 |
+
context=context
|
| 62 |
+
)
|
| 63 |
return {"answer": result["answer"]}
|
| 64 |
|
| 65 |
@app.get("/")
|