Update app.py
Browse filesmodified output layout; modified sorted_sentiments_output output from JSON to DataFrame
app.py
CHANGED
|
@@ -60,15 +60,25 @@ with gr.Blocks() as demo:
|
|
| 60 |
|
| 61 |
# ----- OUTPUTS -----
|
| 62 |
with gr.Row():
|
| 63 |
-
gr.
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
with gr.Row():
|
| 68 |
-
gr.
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
|
|
|
|
|
|
| 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,
|