Spaces:
Runtime error
Runtime error
Commit
·
69d8cee
1
Parent(s):
fba604e
updates
Browse files- models/base.py +1 -1
models/base.py
CHANGED
|
@@ -47,5 +47,5 @@ class BaseModel:
|
|
| 47 |
predictions = resp.json()["predictions"]
|
| 48 |
if isinstance(predictions[0], str):
|
| 49 |
return predictions[0].strip()
|
| 50 |
-
predictions = sorted(predictions, key=lambda d: d['score'])
|
| 51 |
return predictions[-1]["text"].strip()
|
|
|
|
| 47 |
predictions = resp.json()["predictions"]
|
| 48 |
if isinstance(predictions[0], str):
|
| 49 |
return predictions[0].strip()
|
| 50 |
+
predictions = sorted(predictions[0], key=lambda d: d['score'])
|
| 51 |
return predictions[-1]["text"].strip()
|