lunadebruyne commited on
Commit
efb03fe
·
1 Parent(s): 071fa02

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +28 -30
app.py CHANGED
@@ -300,37 +300,35 @@ with gr.Blocks() as demo:
300
  _As we are currently updating this demo, submitting your own data is unavailable for the moment._
301
  _Try out the showcase mode._
302
  """)
303
- with gr.Box():
304
- with gr.Row():
305
- with gr.Column():
306
- demo_btn = gr.Button("Showcase with example data", variant="primary")
307
- with gr.Column():
308
- gr.Markdown("""
309
- #### Run in showcase mode or use your own data
310
- Try out the demo in showcase mode, which uses example data (609,206 tweets about the COVID-19 pandemic) with all the options provided by the demo, or upload your own dataset.
311
- """)
312
- with gr.Box():
313
- with gr.Row():
314
- with gr.Column():
315
- input_file = gr.File(
316
- label="Upload a dataset")
317
- input_checks = gr.CheckboxGroup(
318
- ["emotion frequencies", "emotion distribution over time", "peaks", "topics"],
319
- label = "Select options")
320
- send_btn = gr.Button("Submit data")
321
- with gr.Column():
322
- gr.Markdown("""
323
- #### Data format
324
- The data should be in tsv-format with two named columns: the first column (id) should contain the sentence IDs, and the second column (text) should contain the actual texts. Optionally, there is a third column named 'date', which specifies the date associated with the text (e.g., tweet date). This column is necessary when the options 'emotion distribution over time' and 'peaks' are selected. For now, we only accept files with maximum 400 sentences and a limit of 300 tokens per sentence.
325
-
326
- #### Options
327
- **Emotion frequencies** outputs a bar plot with the prediction frequencies of each emotion category (anger, fear, joy, love, sadness or neutral).
328
- **Emotion distribution over time** outputs a line plot that visualises the frequency of predicted emotions over time for each emotion category.
329
- **Peaks** outputs a step graph that only shows the significant fluctuations (upwards and downwards) in emotion frequencies over time.
330
- **Topics** uses [BERTopic](https://maartengr.github.io/BERTopic/index.html) to find topics in the datasets, and outputs a bar plot that shows the emotion distribution per topic.
331
- """)
332
-
333
 
 
334
  with gr.Row():
335
  gr.Markdown("""
336
  ___
 
300
  _As we are currently updating this demo, submitting your own data is unavailable for the moment._
301
  _Try out the showcase mode._
302
  """)
303
+ with gr.Row():
304
+ with gr.Column():
305
+ demo_btn = gr.Button("Showcase with example data", variant="primary")
306
+ with gr.Column():
307
+ gr.Markdown("""
308
+ Run in showcase mode or use your own data
309
+ Try out the demo in showcase mode, which uses example data (609,206 tweets about the COVID-19 pandemic) with all the options provided by the demo, or upload your own dataset.
310
+ """)
311
+ with gr.Row():
312
+ with gr.Column():
313
+ input_file = gr.File(
314
+ label="Upload a dataset")
315
+ input_checks = gr.CheckboxGroup(
316
+ ["emotion frequencies", "emotion distribution over time", "peaks", "topics"],
317
+ label = "Select options")
318
+ send_btn = gr.Button("Submit data")
319
+ with gr.Column():
320
+ gr.Markdown("""
321
+ #### Data format
322
+ The data should be in tsv-format with two named columns: the first column (id) should contain the sentence IDs, and the second column (text) should contain the actual texts. Optionally, there is a third column named 'date', which specifies the date associated with the text (e.g., tweet date). This column is necessary when the options 'emotion distribution over time' and 'peaks' are selected. For now, we only accept files with maximum 400 sentences and a limit of 300 tokens per sentence.
323
+
324
+ #### Options
325
+ **Emotion frequencies** outputs a bar plot with the prediction frequencies of each emotion category (anger, fear, joy, love, sadness or neutral).
326
+ **Emotion distribution over time** outputs a line plot that visualises the frequency of predicted emotions over time for each emotion category.
327
+ **Peaks** outputs a step graph that only shows the significant fluctuations (upwards and downwards) in emotion frequencies over time.
328
+ **Topics** uses [BERTopic](https://maartengr.github.io/BERTopic/index.html) to find topics in the datasets, and outputs a bar plot that shows the emotion distribution per topic.
329
+ """)
 
 
 
330
 
331
+
332
  with gr.Row():
333
  gr.Markdown("""
334
  ___