Kaushik Bar
commited on
Commit
•
37fe09a
1
Parent(s):
1f0005e
first commit
Browse files
app.py
CHANGED
@@ -122,7 +122,9 @@ def sequence_to_classify(text, labels):
|
|
122 |
pred["scores"], pred["labels"] = zip(*sorted_sl)
|
123 |
preds.append(pred)
|
124 |
|
125 |
-
|
|
|
|
|
126 |
predicted_labels = list(preds['labels'])
|
127 |
predicted_scores = list(preds['scores'])
|
128 |
print(predicted_labels)
|
|
|
122 |
pred["scores"], pred["labels"] = zip(*sorted_sl)
|
123 |
preds.append(pred)
|
124 |
|
125 |
+
if len(preds) == 1:
|
126 |
+
preds = preds[0]
|
127 |
+
|
128 |
predicted_labels = list(preds['labels'])
|
129 |
predicted_scores = list(preds['scores'])
|
130 |
print(predicted_labels)
|