sdbrgo commited on
Commit
136512a
·
verified ·
1 Parent(s): e560861

Update app.py

Browse files

modified output layout; modified sorted_sentiments_output output from JSON to DataFrame

Files changed (1) hide show
  1. app.py +18 -8
app.py CHANGED
@@ -60,15 +60,25 @@ with gr.Blocks() as demo:
60
 
61
  # ----- OUTPUTS -----
62
  with gr.Row():
63
- gr.Markdown("## 🗨️📈Public Sentiment Analytics")
64
- sentiment_metrics_output = gr.JSON()
65
- gr.Markdown("## 📊🗨️ Public Sentiments")
66
- sorted_sentiments_output = gr.JSON()
 
 
 
 
 
 
 
 
67
  with gr.Row():
68
- gr.Markdown("## 📃🩺Participation Dynamics")
69
- typology_output = gr.JSON()
70
- gr.Markdown("## 📃🩺Reach & Equity")
71
- pai_2_output = gr.JSON()
 
 
72
 
73
  btn.click(
74
  fn=run_app,
 
60
 
61
  # ----- OUTPUTS -----
62
  with gr.Row():
63
+ with gr.Column(scale=3):
64
+ gr.Markdown("## 📊🗨️ Public Sentiments")
65
+ sorted_sentiments_output = gr.DataFrame(
66
+ show_label=True,
67
+ display_row_numbers=True,
68
+ height=300,
69
+ interactive=False,
70
+ wrap=True
71
+ )
72
+ with gr.Column(scale=2):
73
+ gr.Markdown("## 🗨️📈Public Sentiment Analytics")
74
+ sentiment_metrics_output = gr.JSON()
75
  with gr.Row():
76
+ with gr.Column(scale=1):
77
+ gr.Markdown("## 📃🩺Participation Dynamics")
78
+ typology_output = gr.JSON()
79
+ with gr.Column(scale=1):
80
+ gr.Markdown("## 📃🩺Reach & Equity")
81
+ pai_2_output = gr.JSON()
82
 
83
  btn.click(
84
  fn=run_app,