Spaces:
Runtime error
Runtime error
Update game3.py
Browse files
game3.py
CHANGED
@@ -79,18 +79,24 @@ def func3(num_selected, human_predict, num1, num2, user_important):
|
|
79 |
# user_select += "nothing. Interesting! "
|
80 |
user_select += "Wanna see how the AI made the guess? Click here. β¬
οΈ"
|
81 |
|
82 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
if abs(golden_label - human_predict) <= 20 and abs(golden_label - ai_predict) <= 20:
|
84 |
-
chatbot.append(("The correct answer is " + str(golden_label) + ". Congratulations! π Both of you get the correct answer!", user_select))
|
85 |
num1 += 1
|
86 |
num2 += 1
|
87 |
elif abs(golden_label - human_predict) > 20 and abs(golden_label - ai_predict) > 20:
|
88 |
-
chatbot.append(("The correct answer is " + str(golden_label) + ". Sorry.. No one gets the correct answer. But nice try! π", user_select))
|
89 |
elif abs(golden_label - human_predict) <= 20 and abs(golden_label - ai_predict) > 20:
|
90 |
-
chatbot.append(("The correct answer is " + str(golden_label) + ". Great! π You are closer to the answer and better than AI!", user_select))
|
91 |
num1 += 1
|
92 |
else:
|
93 |
-
chatbot.append(("The correct answer is " + str(golden_label) + ". Sorry.. AI wins in this round.", user_select))
|
94 |
num2 += 1
|
95 |
|
96 |
tot_scores = ''' ### <p style="text-align: center;"> Machine   ''' + str(int(num2)) + '''   VS   ''' + str(int(num1)) + '''   Human </p>'''
|
|
|
79 |
# user_select += "nothing. Interesting! "
|
80 |
user_select += "Wanna see how the AI made the guess? Click here. β¬
οΈ"
|
81 |
|
82 |
+
if golden_label > 60:
|
83 |
+
gender = ' (female)'
|
84 |
+
elif golden_label < 40:
|
85 |
+
gender = ' (male)'
|
86 |
+
else:
|
87 |
+
gender = ' (neutral)'
|
88 |
+
|
89 |
if abs(golden_label - human_predict) <= 20 and abs(golden_label - ai_predict) <= 20:
|
90 |
+
chatbot.append(("The correct answer is " + str(golden_label) + gender + ". Congratulations! π Both of you get the correct answer!", user_select))
|
91 |
num1 += 1
|
92 |
num2 += 1
|
93 |
elif abs(golden_label - human_predict) > 20 and abs(golden_label - ai_predict) > 20:
|
94 |
+
chatbot.append(("The correct answer is " + str(golden_label) + gender + ". Sorry.. No one gets the correct answer. But nice try! π", user_select))
|
95 |
elif abs(golden_label - human_predict) <= 20 and abs(golden_label - ai_predict) > 20:
|
96 |
+
chatbot.append(("The correct answer is " + str(golden_label) + gender + ". Great! π You are closer to the answer and better than AI!", user_select))
|
97 |
num1 += 1
|
98 |
else:
|
99 |
+
chatbot.append(("The correct answer is " + str(golden_label) + gender + ". Sorry.. AI wins in this round.", user_select))
|
100 |
num2 += 1
|
101 |
|
102 |
tot_scores = ''' ### <p style="text-align: center;"> Machine   ''' + str(int(num2)) + '''   VS   ''' + str(int(num1)) + '''   Human </p>'''
|