Spaces:
Runtime error
Runtime error
Update game1.py
Browse files
game1.py
CHANGED
@@ -219,12 +219,12 @@ def func1(lang_selected, num_selected, human_predict, num1, num2, user_important
|
|
219 |
else:
|
220 |
chatbot.append(("The correct answer is " + str(golden_label) + ". Sorry... No one gets the correct answer. But nice try! π", user_select))
|
221 |
|
222 |
-
data = pd.DataFrame(
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
)
|
228 |
# scroe_human = ''' # Human: ''' + str(int(num1))
|
229 |
# scroe_robot = ''' # Robot: ''' + str(int(num2))
|
230 |
tot_scores = ''' ### <p style="text-align: center;"> Machine   ''' + str(int(num2)) + '''   VS   ''' + str(int(num1)) + '''   Human </p>'''
|
@@ -232,21 +232,21 @@ def func1(lang_selected, num_selected, human_predict, num1, num2, user_important
|
|
232 |
|
233 |
num_tmp = max(num1, num2)
|
234 |
y_lim_upper = (int((num_tmp + 3)/10)+1) * 10
|
235 |
-
figure = gr.BarPlot.update(
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
# tooltip=["Role", "Scores"],
|
249 |
-
return ai_predict, chatbot, num1, num2, tot_scores
|
250 |
|
251 |
def interpre1(lang_selected, num_selected):
|
252 |
if lang_selected in ['en']:
|
|
|
219 |
else:
|
220 |
chatbot.append(("The correct answer is " + str(golden_label) + ". Sorry... No one gets the correct answer. But nice try! π", user_select))
|
221 |
|
222 |
+
# data = pd.DataFrame(
|
223 |
+
# {
|
224 |
+
# "Role": ["AI π€", "HUMAN π¨π©"],
|
225 |
+
# "Scores": [num2, num1],
|
226 |
+
# }
|
227 |
+
# )
|
228 |
# scroe_human = ''' # Human: ''' + str(int(num1))
|
229 |
# scroe_robot = ''' # Robot: ''' + str(int(num2))
|
230 |
tot_scores = ''' ### <p style="text-align: center;"> Machine   ''' + str(int(num2)) + '''   VS   ''' + str(int(num1)) + '''   Human </p>'''
|
|
|
232 |
|
233 |
num_tmp = max(num1, num2)
|
234 |
y_lim_upper = (int((num_tmp + 3)/10)+1) * 10
|
235 |
+
# figure = gr.BarPlot.update(
|
236 |
+
# data,
|
237 |
+
# x="Role",
|
238 |
+
# y="Scores",
|
239 |
+
# color="Role",
|
240 |
+
# vertical=False,
|
241 |
+
# y_lim=[0,y_lim_upper],
|
242 |
+
# color_legend_position='none',
|
243 |
+
# height=250,
|
244 |
+
# width=500,
|
245 |
+
# show_label=False,
|
246 |
+
# container=False,
|
247 |
+
# )
|
248 |
# tooltip=["Role", "Scores"],
|
249 |
+
return ai_predict, chatbot, num1, num2, tot_scores
|
250 |
|
251 |
def interpre1(lang_selected, num_selected):
|
252 |
if lang_selected in ['en']:
|