Spaces:
Sleeping
Sleeping
Commit
Β·
2eb1461
1
Parent(s):
6885547
Update app.py
Browse files
app.py
CHANGED
@@ -18,11 +18,11 @@ def ret_nl():
|
|
18 |
def reset_scores():
|
19 |
data = pd.DataFrame(
|
20 |
{
|
21 |
-
"Role": ["AI π€", "HUMAN
|
22 |
"Scores": [0, 0],
|
23 |
}
|
24 |
)
|
25 |
-
tot_scores = ''' ### <p style="text-align: center;"> π€ Machine   ''' + str(int(0)) + '''   VS   ''' + str(int(0)) + '''   Human
|
26 |
|
27 |
# scroe_human = ''' # Human: ''' + str(int(0))
|
28 |
# scroe_robot = ''' # Robot: ''' + str(int(0))
|
@@ -46,18 +46,13 @@ with gr.Blocks(theme=gr.themes.Default(text_size=gr.themes.sizes.text_md)) as de
|
|
46 |
num3 = gr.Number(value=0, container=False, show_label=False, visible=False)
|
47 |
num4 = gr.Number(value=0, container=False, show_label=False, visible=False)
|
48 |
|
49 |
-
|
50 |
-
with gr.Column():
|
51 |
placeholder = gr.Markdown(
|
52 |
''' ## Welcome to the Language Model Explanation Challenge!
|
53 |
Language Models (LMs) are powerful AI tools to understand and generate human language.<br />
|
54 |
However, they sometimes make mistakes... and it's hard to know why!<br /><br />
|
55 |
-
|
56 |
-
→ Play a game against AI to find out!<br />
|
57 |
-
Does AI think like you or not at all?<br />
|
58 |
-
→ Check out the color highlighting to see which parts of the sentence are more important for the machine.<br />
|
59 |
-
Can you outsmart the AI?<br />
|
60 |
-
→ Try to write a text that will trick it into the wrong decision<br /><br />
|
61 |
|
62 |
Choose one of the tasks below ... and start to play!
|
63 |
'''
|
@@ -72,9 +67,16 @@ with gr.Blocks(theme=gr.themes.Default(text_size=gr.themes.sizes.text_md)) as de
|
|
72 |
#If you could successfully trick the AI into guessing the wrong gender, you get the score.
|
73 |
|
74 |
)
|
75 |
-
|
76 |
-
|
77 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
|
79 |
with gr.Tab("Like or Dislike"):
|
80 |
text_en = gr.Textbox(label="", value="en", visible=False)
|
|
|
18 |
def reset_scores():
|
19 |
data = pd.DataFrame(
|
20 |
{
|
21 |
+
"Role": ["AI π€", "HUMAN π"],
|
22 |
"Scores": [0, 0],
|
23 |
}
|
24 |
)
|
25 |
+
tot_scores = ''' ### <p style="text-align: center;"> π€ Machine   ''' + str(int(0)) + '''   VS   ''' + str(int(0)) + '''   Human π </p>'''
|
26 |
|
27 |
# scroe_human = ''' # Human: ''' + str(int(0))
|
28 |
# scroe_robot = ''' # Robot: ''' + str(int(0))
|
|
|
46 |
num3 = gr.Number(value=0, container=False, show_label=False, visible=False)
|
47 |
num4 = gr.Number(value=0, container=False, show_label=False, visible=False)
|
48 |
|
49 |
+
with gr.Column(scale=2):
|
50 |
+
#with gr.Column():
|
51 |
placeholder = gr.Markdown(
|
52 |
''' ## Welcome to the Language Model Explanation Challenge!
|
53 |
Language Models (LMs) are powerful AI tools to understand and generate human language.<br />
|
54 |
However, they sometimes make mistakes... and it's hard to know why!<br /><br />
|
55 |
+
|
|
|
|
|
|
|
|
|
|
|
56 |
|
57 |
Choose one of the tasks below ... and start to play!
|
58 |
'''
|
|
|
67 |
#If you could successfully trick the AI into guessing the wrong gender, you get the score.
|
68 |
|
69 |
)
|
70 |
+
with gr.Column(scale=1):
|
71 |
+
#logo = gr.Image('logo.png', height=230, width=600, min_width=80, show_label=False, show_share_button=False, interactive=False, container=False)
|
72 |
+
placeholder = gr.Markdown(
|
73 |
+
Are *humans* or *machines* better at understanding language?<br />
|
74 |
+
→ Play a game against AI to find out!<br />
|
75 |
+
Does AI think like you or not at all?<br />
|
76 |
+
→ Check out the color highlighting to see which parts of the sentence are more important for the machine.<br />
|
77 |
+
Can you outsmart the AI?<br />
|
78 |
+
→ Try to write a text that will trick it into the wrong decision<br /><br />
|
79 |
+
)
|
80 |
|
81 |
with gr.Tab("Like or Dislike"):
|
82 |
text_en = gr.Textbox(label="", value="en", visible=False)
|