AIEcosystem commited on
Commit
ae0756a
·
verified ·
1 Parent(s): 19d27f3

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +8 -8
src/streamlit_app.py CHANGED
@@ -88,7 +88,7 @@ Results are presented in easy-to-read tables, visualized in an interactive tree
88
  For any errors or inquiries, please contact us at info@nlpblogs.com""")
89
 
90
  with st.sidebar:
91
- st.write("Use the following code to embed the EntityFinance web app on your website. Feel free to adjust the width and height values to fit your page.")
92
  code = '''
93
  <iframe
94
  src="https://aiecosystem-mediextract.hf.space"
@@ -245,7 +245,7 @@ if st.button("Results"):
245
  # Tree map
246
  st.subheader("Tree map", divider = "gray")
247
  fig_treemap = px.treemap(df, path=[px.Constant("all"), 'category', 'label', 'text'], values='score', color='category')
248
- fig_treemap.update_layout(margin=dict(t=50, l=25, r=25, b=25), paper_bgcolor='#E8F5E9', plot_bgcolor='#E8F5E9')
249
  st.plotly_chart(fig_treemap)
250
 
251
  # Pie and Bar charts
@@ -258,8 +258,8 @@ if st.button("Results"):
258
  fig_pie = px.pie(grouped_counts, values='count', names='category', hover_data=['count'], labels={'count': 'count'}, title='Percentage of predicted categories')
259
  fig_pie.update_traces(textposition='inside', textinfo='percent+label')
260
  fig_pie.update_layout(
261
- paper_bgcolor='#E8F5E9',
262
- plot_bgcolor='#E8F5E9'
263
  )
264
  st.plotly_chart(fig_pie)
265
 
@@ -270,8 +270,8 @@ if st.button("Results"):
270
  st.subheader("Bar chart", divider = "gray")
271
  fig_bar = px.bar(grouped_counts, x="count", y="category", color="category", text_auto=True, title='Occurrences of predicted categories')
272
  fig_bar.update_layout( # Changed from fig_pie to fig_bar
273
- paper_bgcolor='#E8F5E9',
274
- plot_bgcolor='#E8F5E9'
275
  )
276
  st.plotly_chart(fig_bar)
277
 
@@ -284,8 +284,8 @@ if st.button("Results"):
284
  st.dataframe(repeating_entities, use_container_width=True)
285
  fig_repeating_bar = px.bar(repeating_entities, x='Entity', y='Count', color='Entity')
286
  fig_repeating_bar.update_layout(xaxis={'categoryorder': 'total descending'},
287
- paper_bgcolor='#E8F5E9',
288
- plot_bgcolor='#E8F5E9')
289
  st.plotly_chart(fig_repeating_bar)
290
  else:
291
  st.warning("No entities were found that occur more than once.")
 
88
  For any errors or inquiries, please contact us at info@nlpblogs.com""")
89
 
90
  with st.sidebar:
91
+ st.write("Use the following code to embed the MediExtract web app on your website. Feel free to adjust the width and height values to fit your page.")
92
  code = '''
93
  <iframe
94
  src="https://aiecosystem-mediextract.hf.space"
 
245
  # Tree map
246
  st.subheader("Tree map", divider = "gray")
247
  fig_treemap = px.treemap(df, path=[px.Constant("all"), 'category', 'label', 'text'], values='score', color='category')
248
+ fig_treemap.update_layout(margin=dict(t=50, l=25, r=25, b=25), paper_bgcolor='#F5F5F5', plot_bgcolor='#F5F5F5')
249
  st.plotly_chart(fig_treemap)
250
 
251
  # Pie and Bar charts
 
258
  fig_pie = px.pie(grouped_counts, values='count', names='category', hover_data=['count'], labels={'count': 'count'}, title='Percentage of predicted categories')
259
  fig_pie.update_traces(textposition='inside', textinfo='percent+label')
260
  fig_pie.update_layout(
261
+ paper_bgcolor='#F5F5F5',
262
+ plot_bgcolor='#F5F5F5'
263
  )
264
  st.plotly_chart(fig_pie)
265
 
 
270
  st.subheader("Bar chart", divider = "gray")
271
  fig_bar = px.bar(grouped_counts, x="count", y="category", color="category", text_auto=True, title='Occurrences of predicted categories')
272
  fig_bar.update_layout( # Changed from fig_pie to fig_bar
273
+ paper_bgcolor='#F5F5F5',
274
+ plot_bgcolor='#F5F5F5'
275
  )
276
  st.plotly_chart(fig_bar)
277
 
 
284
  st.dataframe(repeating_entities, use_container_width=True)
285
  fig_repeating_bar = px.bar(repeating_entities, x='Entity', y='Count', color='Entity')
286
  fig_repeating_bar.update_layout(xaxis={'categoryorder': 'total descending'},
287
+ paper_bgcolor='#F5F5F5',
288
+ plot_bgcolor='#F5F5F5')
289
  st.plotly_chart(fig_repeating_bar)
290
  else:
291
  st.warning("No entities were found that occur more than once.")