lunadebruyne commited on
Commit
71f6b58
·
1 Parent(s): 0186e6d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -172,7 +172,7 @@ def dist(output_file, input_checks):
172
  base = alt.Chart(data).encode(
173
  x ="Date",
174
  y=alt.Y("Frequency", scale=alt.Scale(domain=[0, (n + 9) // 10 * 10])),
175
- color=alt.Color("Emotion category", scale=alt.Scale(domain=domain, range=range_)))
176
 
177
 
178
  points = base.mark_circle().encode(
@@ -317,7 +317,8 @@ with gr.Blocks() as demo:
317
  input_checks = gr.CheckboxGroup(
318
  ["emotion frequencies", "emotion distribution over time", "peaks", "topics"],
319
  label = "Select options")
320
- send_btn = gr.Button("Send")
 
321
  with gr.Column():
322
  output_file = gr.File(label="Predictions", visible=False)
323
  next_button_freq = gr.Button("Show emotion frequencies", visible=False)
 
172
  base = alt.Chart(data).encode(
173
  x ="Date",
174
  y=alt.Y("Frequency", scale=alt.Scale(domain=[0, (n + 9) // 10 * 10])),
175
+ color=alt.Color("Emotion category", scale=alt.Scale(domain=domain, range=range_), legend=alt.Legend(orient='bottom', direction='horizontal')))
176
 
177
 
178
  points = base.mark_circle().encode(
 
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
+ demo_btn = gr.Button("... or showcase with example data")
322
  with gr.Column():
323
  output_file = gr.File(label="Predictions", visible=False)
324
  next_button_freq = gr.Button("Show emotion frequencies", visible=False)