Update app.py
Browse files
app.py
CHANGED
|
@@ -26,17 +26,18 @@ with gr.Blocks() as demo:
|
|
| 26 |
gr.Markdown("# Environmental Transparency Explorer Tool")
|
| 27 |
gr.Markdown("## Explore the data from 'Misinformation by Omission: The Need for More Environmental Transparency in AI'")
|
| 28 |
with gr.Row():
|
| 29 |
-
gr.Markdown("### Data by Organization")
|
| 30 |
with gr.Column(scale=1):
|
| 31 |
org_choice= gr.Dropdown(organizations, value="Alphabet", label="Organizations", info="Pick an organization to explore their environmental disclosures", interactive=True)
|
| 32 |
with gr.Column(scale=4):
|
|
|
|
| 33 |
fig = generate_figure(org_choice)
|
| 34 |
plt = gr.Plot(fig)
|
| 35 |
with gr.Row():
|
| 36 |
with gr.Column():
|
| 37 |
gr.Markdown("### All Data")
|
| 38 |
fig2 = px.histogram(data, x="Year", color="Environmental Transparency")
|
| 39 |
-
|
|
|
|
| 40 |
org_choice.select(generate_figure, inputs=[org_choice], outputs=[plt])
|
| 41 |
|
| 42 |
demo.launch()
|
|
|
|
| 26 |
gr.Markdown("# Environmental Transparency Explorer Tool")
|
| 27 |
gr.Markdown("## Explore the data from 'Misinformation by Omission: The Need for More Environmental Transparency in AI'")
|
| 28 |
with gr.Row():
|
|
|
|
| 29 |
with gr.Column(scale=1):
|
| 30 |
org_choice= gr.Dropdown(organizations, value="Alphabet", label="Organizations", info="Pick an organization to explore their environmental disclosures", interactive=True)
|
| 31 |
with gr.Column(scale=4):
|
| 32 |
+
gr.Markdown("### Data by Organization")
|
| 33 |
fig = generate_figure(org_choice)
|
| 34 |
plt = gr.Plot(fig)
|
| 35 |
with gr.Row():
|
| 36 |
with gr.Column():
|
| 37 |
gr.Markdown("### All Data")
|
| 38 |
fig2 = px.histogram(data, x="Year", color="Environmental Transparency")
|
| 39 |
+
fig2.update_layout(xaxis_type='category')
|
| 40 |
+
plt2 = gr.Plot(fig2)
|
| 41 |
org_choice.select(generate_figure, inputs=[org_choice], outputs=[plt])
|
| 42 |
|
| 43 |
demo.launch()
|