Spaces:
Sleeping
Sleeping
Add application file
Browse files
app.py
CHANGED
@@ -46,7 +46,7 @@ def predict():
|
|
46 |
|
47 |
predicted_class_idx = logits.argmax(-1).item()
|
48 |
print(model.config.id2label[predicted_class_idx])
|
49 |
-
# Return the
|
50 |
return json.dumps({"class": model.config.id2label[predicted_class_idx]})
|
51 |
except Exception as e:
|
52 |
return json.dumps({"Uh oh": f"{str(e)}"})
|
|
|
46 |
|
47 |
predicted_class_idx = logits.argmax(-1).item()
|
48 |
print(model.config.id2label[predicted_class_idx])
|
49 |
+
# Return the Predictions
|
50 |
return json.dumps({"class": model.config.id2label[predicted_class_idx]})
|
51 |
except Exception as e:
|
52 |
return json.dumps({"Uh oh": f"{str(e)}"})
|