Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1052,9 +1052,9 @@ def change_language():
|
|
1052 |
class_order = list(range(len(labels)))
|
1053 |
np.random.shuffle(class_order)
|
1054 |
correct_text = gr.Text(
|
1055 |
-
f"Correct was: ''. Question 1/{len(babel_imagenet['EN'][0])} ", label="
|
1056 |
)
|
1057 |
-
player_score_text = gr.Text(f"Your choice: (Score: 0) ", label="
|
1058 |
# clip_score_text = gr.Text(f"mSigLIP chose: '' (Score: 0)", label="Opponent")
|
1059 |
|
1060 |
return (
|
@@ -1075,12 +1075,12 @@ def select(idx, choice, correct, player_score, choices):
|
|
1075 |
player_score = player_score + int(player_correct)
|
1076 |
|
1077 |
correct_text = gr.Text(
|
1078 |
-
f"
|
1079 |
-
label="
|
1080 |
)
|
1081 |
player_score_text = gr.Text(
|
1082 |
f"Your choice: {player_choice} {'✅' if player_correct else '❌'} (Score: {player_score}) ",
|
1083 |
-
label="
|
1084 |
)
|
1085 |
|
1086 |
return correct_text, player_score_text, player_score
|
|
|
1052 |
class_order = list(range(len(labels)))
|
1053 |
np.random.shuffle(class_order)
|
1054 |
correct_text = gr.Text(
|
1055 |
+
f"Correct was: ''. Question 1/{len(babel_imagenet['EN'][0])} ", label="Correct answer"
|
1056 |
)
|
1057 |
+
player_score_text = gr.Text(f"Your choice: (Score: 0) ", label="You selected:")
|
1058 |
# clip_score_text = gr.Text(f"mSigLIP chose: '' (Score: 0)", label="Opponent")
|
1059 |
|
1060 |
return (
|
|
|
1075 |
player_score = player_score + int(player_correct)
|
1076 |
|
1077 |
correct_text = gr.Text(
|
1078 |
+
f"{correct_name}. Question {idx+1}/{len(babel_imagenet['EN'][0])} ",
|
1079 |
+
label="Correct answer",
|
1080 |
)
|
1081 |
player_score_text = gr.Text(
|
1082 |
f"Your choice: {player_choice} {'✅' if player_correct else '❌'} (Score: {player_score}) ",
|
1083 |
+
label="You selected:",
|
1084 |
)
|
1085 |
|
1086 |
return correct_text, player_score_text, player_score
|