Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -68,7 +68,7 @@ def predict(sentence1, sentence2):
|
|
68 |
test_data = BertSemanticDataGenerator(
|
69 |
sentence_pairs, labels=None, batch_size=1, shuffle=False, include_targets=False,
|
70 |
)
|
71 |
-
probs
|
72 |
|
73 |
labels_probs = {labels[i]: float(probs[i]) for i, _ in enumerate(labels)}
|
74 |
return labels_probs
|
|
|
68 |
test_data = BertSemanticDataGenerator(
|
69 |
sentence_pairs, labels=None, batch_size=1, shuffle=False, include_targets=False,
|
70 |
)
|
71 |
+
probs = model.predict(test_data[0])[0]
|
72 |
|
73 |
labels_probs = {labels[i]: float(probs[i]) for i, _ in enumerate(labels)}
|
74 |
return labels_probs
|