Commit
·
f82c642
1
Parent(s):
dea4cfb
Update handler.py
Browse files- handler.py +2 -1
handler.py
CHANGED
|
@@ -43,7 +43,8 @@ class EndpointHandler():
|
|
| 43 |
- "label": A string representing what the label/class is. There can be multiple labels.
|
| 44 |
- "score": A score between 0 and 1 describing how confident the model is for this label/class.
|
| 45 |
"""
|
| 46 |
-
|
|
|
|
| 47 |
if question is not None:
|
| 48 |
prediction = self.pipeline.run(query=question, params={"Retriever": {"top_k": 10}, "Reader": {"top_k": 5}})
|
| 49 |
else:
|
|
|
|
| 43 |
- "label": A string representing what the label/class is. There can be multiple labels.
|
| 44 |
- "score": A score between 0 and 1 describing how confident the model is for this label/class.
|
| 45 |
"""
|
| 46 |
+
inputs = data.pop("inputs", None)
|
| 47 |
+
question = inputs.pop("question", None)
|
| 48 |
if question is not None:
|
| 49 |
prediction = self.pipeline.run(query=question, params={"Retriever": {"top_k": 10}, "Reader": {"top_k": 5}})
|
| 50 |
else:
|