lunadebruyne commited on
Commit
823fbc6
·
1 Parent(s): 3a42d21

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py CHANGED
@@ -305,6 +305,22 @@ with gr.Blocks() as demo:
305
  label = "Select options")
306
  send_btn = gr.Button("Submit data")
307
  demo_btn = gr.Button("... or showcase with example data")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
308
  with gr.Column():
309
  message = gr.Textbox(label="Message", visible=False)
310
 
 
305
  label = "Select options")
306
  send_btn = gr.Button("Submit data")
307
  demo_btn = gr.Button("... or showcase with example data")
308
+ with gr.Column():
309
+ gr.Markdown("""
310
+ #### Data format
311
+ 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.
312
+
313
+ #### Options
314
+ **Emotion frequencies** outputs a bar plot with the prediction frequencies of each emotion category (anger, fear, joy, love, sadness or neutral).
315
+ **Emotion distribution over time** outputs a line plot that visualises the frequency of predicted emotions over time for each emotion category.
316
+ **Peaks** outputs a step graph that only shows the significant fluctuations (upwards and downwards) in emotion frequencies over time.
317
+ **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.
318
+ """)
319
+ with gr.Row():
320
+ gr.Markdown("""
321
+ ___
322
+ """)
323
+ with gr.Row():
324
  with gr.Column():
325
  message = gr.Textbox(label="Message", visible=False)
326