Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -89,7 +89,7 @@ def predict_topic(text: str) -> [List[str], str]:
|
|
89 |
continue
|
90 |
feature_values = [(col, row[0, col]) for col in row.nonzero()[1]]
|
91 |
for subj_id, score in model.predict(feature_values, top_k=1000):
|
92 |
-
score = round(score
|
93 |
results.append((id2label[str(subj_id)], score))
|
94 |
return results, language
|
95 |
|
|
|
89 |
continue
|
90 |
feature_values = [(col, row[0, col]) for col in row.nonzero()[1]]
|
91 |
for subj_id, score in model.predict(feature_values, top_k=1000):
|
92 |
+
score = round(score, 2)
|
93 |
results.append((id2label[str(subj_id)], score))
|
94 |
return results, language
|
95 |
|