sashavor commited on
Commit
820d8a7
1 Parent(s): dc0eec0

fixing score

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -49,10 +49,10 @@ def random_image():
49
  random.shuffle(options)
50
  options = [classes[int(i)] for i in options]
51
  return im, label, gr.Radio.update(value=None, choices=options), None
52
-
53
  def check_score(pred, truth, current_score):
54
  if pred == classes[int(truth)]:
55
- return current_score + 1, f"Your score is {current_score}"
56
  return current_score, f"Your score is {current_score}"
57
 
58
  def compare_score(userclass, prediction):
 
49
  random.shuffle(options)
50
  options = [classes[int(i)] for i in options]
51
  return im, label, gr.Radio.update(value=None, choices=options), None
52
+
53
  def check_score(pred, truth, current_score):
54
  if pred == classes[int(truth)]:
55
+ return current_score + 1, f"Your score is {current_score+1}"
56
  return current_score, f"Your score is {current_score}"
57
 
58
  def compare_score(userclass, prediction):