arianna-bis commited on
Commit
2eb1461
Β·
1 Parent(s): 6885547

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -13
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 &ensp; ''' + str(int(0)) + ''' &ensp; VS &ensp; ''' + str(int(0)) + ''' &ensp; Human πŸ‘¨πŸ‘© </p>'''
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
- # 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
- Are *humans* or *machines* better at understanding language?<br />
56
- &rarr; Play a game against AI to find out!<br />
57
- Does AI think like you or not at all?<br />
58
- &rarr; 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
- &rarr; 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
- # with gr.Column(scale=1):
76
- # logo = gr.Image('logo.png', height=230, width=600, min_width=80, show_label=False, show_share_button=False, interactive=False, container=False)
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 &ensp; ''' + str(int(0)) + ''' &ensp; VS &ensp; ''' + str(int(0)) + ''' &ensp; 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
+ &rarr; Play a game against AI to find out!<br />
75
+ Does AI think like you or not at all?<br />
76
+ &rarr; 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
+ &rarr; 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)