sashavor commited on
Commit
088c61e
1 Parent(s): 367e0cd

trying to fix the score

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -62,7 +62,7 @@ def check_score(pred, truth, current_score, total_score, has_guessed):
62
 
63
 
64
 
65
- def compare_score(userclass, truth, has_guessed):
66
  if userclass is None:
67
  return"Try guessing a category!"
68
  else:
@@ -98,7 +98,7 @@ with gr.Blocks() as demo:
98
  demo.load(random_image, None, [image, image_label, radio, prediction])
99
  radio.change(model_classify, [radio, image], [prediction, model_class, has_guessed])
100
  radio.change(check_score, [radio, image_label, user_score, total_score, has_guessed], [user_score, score, total_score])
101
- radio.change(compare_score, [radio, image_label, has_guessed], message)
102
  btn.click(random_image, None, [image, image_label, radio, prediction])
103
  btn.click(lambda :False, None, has_guessed)
104
 
 
62
 
63
 
64
 
65
+ def compare_score(userclass, truth):
66
  if userclass is None:
67
  return"Try guessing a category!"
68
  else:
 
98
  demo.load(random_image, None, [image, image_label, radio, prediction])
99
  radio.change(model_classify, [radio, image], [prediction, model_class, has_guessed])
100
  radio.change(check_score, [radio, image_label, user_score, total_score, has_guessed], [user_score, score, total_score])
101
+ radio.change(compare_score, [radio, image_label], message)
102
  btn.click(random_image, None, [image, image_label, radio, prediction])
103
  btn.click(lambda :False, None, has_guessed)
104