tommy24 commited on
Commit
bdff327
·
1 Parent(s): 0a31dcc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
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
- userPoints = point_data[""]
1048
- return f"User: {name}'s Total points is: {userPoints}'"
 
 
 
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