Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -1044,8 +1044,11 @@ def classify(platform, UserInput, Images, Textbox2, Textbox3):
|
|
| 1044 |
|
| 1045 |
if points.status_code == 200:
|
| 1046 |
point_data = points.json()
|
| 1047 |
-
|
| 1048 |
-
|
|
|
|
|
|
|
|
|
|
| 1049 |
else:
|
| 1050 |
return "The request has been declined. Please ensure that the provided details match the records registered in our system during the registration process"
|
| 1051 |
|
|
|
|
| 1044 |
|
| 1045 |
if points.status_code == 200:
|
| 1046 |
point_data = points.json()
|
| 1047 |
+
try:
|
| 1048 |
+
userPoints = point_data["points"]
|
| 1049 |
+
return f"User: {name}'s Total points is: {userPoints}'"
|
| 1050 |
+
except:
|
| 1051 |
+
return "Error Occured while retrieving user points. Please try again. "
|
| 1052 |
else:
|
| 1053 |
return "The request has been declined. Please ensure that the provided details match the records registered in our system during the registration process"
|
| 1054 |
|