updating predict function
Browse files
app.py
CHANGED
@@ -18,7 +18,7 @@ def predict(text):
|
|
18 |
outputs = model(**inputs)
|
19 |
predictions = outputs.logits
|
20 |
|
21 |
-
return mapping[predictions.argmax()]
|
22 |
|
23 |
iface = gr.Interface(
|
24 |
fn=predict,
|
|
|
18 |
outputs = model(**inputs)
|
19 |
predictions = outputs.logits
|
20 |
|
21 |
+
return mapping[predictions.argmax().item()]
|
22 |
|
23 |
iface = gr.Interface(
|
24 |
fn=predict,
|