JRQi commited on
Commit
1b0b123
β€’
1 Parent(s): 6e9f2fe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -92,7 +92,7 @@ with gr.Blocks(theme=gr.themes.Default(text_size=gr.themes.sizes.text_md)) as de
92
  input_text = gr.Textbox(label="Review:", value="HELLO! Hallo!", visible=False, container=False)
93
  interpretation1 = gr.components.Interpretation(input_text)
94
 
95
- slider_1_1 = gr.Slider(label="Your rating: Dislike(0) β€”> Like(100)", container=True, min_width=200, height=80, show_label=True, interactive=True)
96
  user_important = gr.Textbox(label="Which words are your guesses based on?", placeholder="Enter words that you think are important for the task")
97
 
98
  with gr.Column(scale=1):
@@ -119,7 +119,7 @@ with gr.Blocks(theme=gr.themes.Default(text_size=gr.themes.sizes.text_md)) as de
119
  with gr.Row():
120
  with gr.Column(scale=2):
121
  chat_button_1 = gr.Button("Click to see AI's rating", size='sm')
122
- slider_1_2 = gr.Slider(label="AI rating: Dislike(0) β€”> Like(100)", container=True, min_width=200, height=80, show_label=True, interactive=True)
123
  interpre_button = gr.Button("See how AI got its rating", size='sm')
124
  placeholder_text = gr.Textbox(label="Red higlights: Positive / Blue higlights: Negative", value="HELLO! Hallo!", visible=False)
125
  interpretation2 = gr.components.Interpretation(placeholder_text)
@@ -137,12 +137,12 @@ with gr.Blocks(theme=gr.themes.Default(text_size=gr.themes.sizes.text_md)) as de
137
  with gr.Column(scale=2):
138
  text_written = gr.Textbox(label="Review: ", placeholder="Enter your own review about a movie/restaurant/book.", visible=True)
139
  # image_1_3 = gr.Image('icon_user.png', height=80, width=80, min_width=80, show_label=False, show_share_button=False, interactive=False)
140
- slider_1_3 = gr.Slider(label="Your rating: Dislike(0) β€”> Like(100)", container=True, min_width=200, height=80, show_label=True, interactive=True)
141
  lang_written = gr.Radio(["English", "Dutch"], label="Language:", info="In which language is the review written?")
142
  chat_button_2 = gr.Button("Click to see AI's rating", size='sm')
143
  placeholder_written_text = gr.Textbox(label="Red higlights: Positive / Blue higlights: Negative", value="HELLO! Hallo!", visible=False)
144
  interpretation4 = gr.components.Interpretation(placeholder_written_text)
145
- slider_1_4 = gr.Slider(label="AI rating: Dislike(0) β€”> Like(100)", container=True, min_width=200, height=80, show_label=True, interactive=True)
146
  with gr.Column(scale=1):
147
  chatbot2 = gr.Chatbot(height=350, min_width=50, container=False) # height=300
148
 
@@ -171,7 +171,7 @@ with gr.Blocks(theme=gr.themes.Default(text_size=gr.themes.sizes.text_md)) as de
171
  sample_button_en_3 = gr.Button("Click to get a sentence", size='sm')
172
  input_text_mf = gr.Textbox(label="Sentence:", value="HELLO! Hallo!", visible=False, container=False)
173
  interpretation_mf_1 = gr.components.Interpretation(input_text_mf)
174
- slider_3_1 = gr.Slider(label="Your guess of author gender: Male(0) β€”β€”> Female(100)", container=True, min_width=200, height=80, show_label=True, interactive=True)
175
  user_important_mf = gr.Textbox(label="Which words are your guesses based on?", placeholder="Enter words that you think are important for the task")
176
  with gr.Column(scale=1):
177
  gr.Markdown(
@@ -196,7 +196,7 @@ with gr.Blocks(theme=gr.themes.Default(text_size=gr.themes.sizes.text_md)) as de
196
  with gr.Row():
197
  with gr.Column(scale=2):
198
  chat_button_mf = gr.Button("Click to see AI's guess", size='sm')
199
- slider_3_2 = gr.Slider(label="AI guess on author gender: Male(0) β€”β€”> Female(100)", container=True, min_width=200, height=80, show_label=True, interactive=True)
200
  interpre_button_mf = gr.Button("See how AI made its guess", size='sm')
201
  placeholder_text_mf = gr.Textbox(label="Red higlights: Female / Blue higlights: Male", value="HELLO! Hallo!", visible=False)
202
  interpretation_mf_2 = gr.components.Interpretation(placeholder_text_mf)
@@ -213,11 +213,11 @@ with gr.Blocks(theme=gr.themes.Default(text_size=gr.themes.sizes.text_md)) as de
213
  with gr.Row():
214
  with gr.Column(scale=2):
215
  text_written_mf = gr.Textbox(label="Sentence: ", placeholder="Enter a sentence.", visible=True)
216
- slider_3_3 = gr.Slider(label="Your guess of author gender: Male(0) β€”β€”> Female(100)", container=True, min_width=200, height=80, show_label=True, interactive=True)
217
  chat_button_mf_2 = gr.Button("Click to see AI's guess", size='sm')
218
  placeholder_written_text_mf = gr.Textbox(label="Red higlights: Female / Blue higlights: Male", value="HELLO! Hallo!", visible=False)
219
  interpretation_mf_4 = gr.components.Interpretation(placeholder_written_text_mf)
220
- slider_3_4 = gr.Slider(label="AI guess on author gender: Male(0) β€”β€”> Female(100)", container=True, min_width=200, height=80, show_label=True, interactive=True)
221
  with gr.Column(scale=1):
222
  chatbot_mf_2 = gr.Chatbot(height=350, min_width=50, container=False) # height=300
223
 
 
92
  input_text = gr.Textbox(label="Review:", value="HELLO! Hallo!", visible=False, container=False)
93
  interpretation1 = gr.components.Interpretation(input_text)
94
 
95
+ slider_1_1 = gr.Slider(label="Your rating: Dislike(0) β€”> Like(10)", maximum=10, container=True, min_width=200, height=80, show_label=True, interactive=True)
96
  user_important = gr.Textbox(label="Which words are your guesses based on?", placeholder="Enter words that you think are important for the task")
97
 
98
  with gr.Column(scale=1):
 
119
  with gr.Row():
120
  with gr.Column(scale=2):
121
  chat_button_1 = gr.Button("Click to see AI's rating", size='sm')
122
+ slider_1_2 = gr.Slider(label="AI rating: Dislike(0) β€”> Like(10)", maximum=10, container=True, min_width=200, height=80, show_label=True, interactive=True)
123
  interpre_button = gr.Button("See how AI got its rating", size='sm')
124
  placeholder_text = gr.Textbox(label="Red higlights: Positive / Blue higlights: Negative", value="HELLO! Hallo!", visible=False)
125
  interpretation2 = gr.components.Interpretation(placeholder_text)
 
137
  with gr.Column(scale=2):
138
  text_written = gr.Textbox(label="Review: ", placeholder="Enter your own review about a movie/restaurant/book.", visible=True)
139
  # image_1_3 = gr.Image('icon_user.png', height=80, width=80, min_width=80, show_label=False, show_share_button=False, interactive=False)
140
+ slider_1_3 = gr.Slider(label="Your rating: Dislike(0) β€”> Like(10)", maximum=10, container=True, min_width=200, height=80, show_label=True, interactive=True)
141
  lang_written = gr.Radio(["English", "Dutch"], label="Language:", info="In which language is the review written?")
142
  chat_button_2 = gr.Button("Click to see AI's rating", size='sm')
143
  placeholder_written_text = gr.Textbox(label="Red higlights: Positive / Blue higlights: Negative", value="HELLO! Hallo!", visible=False)
144
  interpretation4 = gr.components.Interpretation(placeholder_written_text)
145
+ slider_1_4 = gr.Slider(label="AI rating: Dislike(0) β€”> Like(10)", maximum=10, container=True, min_width=200, height=80, show_label=True, interactive=True)
146
  with gr.Column(scale=1):
147
  chatbot2 = gr.Chatbot(height=350, min_width=50, container=False) # height=300
148
 
 
171
  sample_button_en_3 = gr.Button("Click to get a sentence", size='sm')
172
  input_text_mf = gr.Textbox(label="Sentence:", value="HELLO! Hallo!", visible=False, container=False)
173
  interpretation_mf_1 = gr.components.Interpretation(input_text_mf)
174
+ slider_3_1 = gr.Slider(label="Your guess of author gender: Male(0) β€”β€”> Female(10)", maximum=10, container=True, min_width=200, height=80, show_label=True, interactive=True)
175
  user_important_mf = gr.Textbox(label="Which words are your guesses based on?", placeholder="Enter words that you think are important for the task")
176
  with gr.Column(scale=1):
177
  gr.Markdown(
 
196
  with gr.Row():
197
  with gr.Column(scale=2):
198
  chat_button_mf = gr.Button("Click to see AI's guess", size='sm')
199
+ slider_3_2 = gr.Slider(label="AI guess on author gender: Male(0) β€”β€”> Female(10)", maximum=10, container=True, min_width=200, height=80, show_label=True, interactive=True)
200
  interpre_button_mf = gr.Button("See how AI made its guess", size='sm')
201
  placeholder_text_mf = gr.Textbox(label="Red higlights: Female / Blue higlights: Male", value="HELLO! Hallo!", visible=False)
202
  interpretation_mf_2 = gr.components.Interpretation(placeholder_text_mf)
 
213
  with gr.Row():
214
  with gr.Column(scale=2):
215
  text_written_mf = gr.Textbox(label="Sentence: ", placeholder="Enter a sentence.", visible=True)
216
+ slider_3_3 = gr.Slider(label="Your guess of author gender: Male(0) β€”β€”> Female(10)", maximum=10, container=True, min_width=200, height=80, show_label=True, interactive=True)
217
  chat_button_mf_2 = gr.Button("Click to see AI's guess", size='sm')
218
  placeholder_written_text_mf = gr.Textbox(label="Red higlights: Female / Blue higlights: Male", value="HELLO! Hallo!", visible=False)
219
  interpretation_mf_4 = gr.components.Interpretation(placeholder_written_text_mf)
220
+ slider_3_4 = gr.Slider(label="AI guess on author gender: Male(0) β€”β€”> Female(10)", maximum=10, container=True, min_width=200, height=80, show_label=True, interactive=True)
221
  with gr.Column(scale=1):
222
  chatbot_mf_2 = gr.Chatbot(height=350, min_width=50, container=False) # height=300
223