Daniel Cerda Escobar commited on
Commit
6083a1d
1 Parent(s): 61ccf4c

Plot graph

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -1,6 +1,6 @@
1
  import streamlit as st
2
  import pandas as pd
3
- import seaborn as sns
4
  import matplotlib.pyplot as plt
5
  import sahi.utils.file
6
  from PIL import Image
@@ -205,9 +205,7 @@ with col2:
205
  col1,col2,col3 = st.columns([1,4,1])
206
  with col2:
207
  chart_data = st.session_state["output_4"]
208
- bar_plot = sns.barplot(x='count', y='category', data=chart_data, hue='category', legend=False)
209
- bar_plot.bar_label(bar_plot.containers[0], fontsize=10);
210
- st.pyplot(bar_plot.figure, use_container_width=True)
211
- #st.bar_chart(chart_data[['category','count']], x='category', y='count', use_container_width=True)
212
 
213
 
 
1
  import streamlit as st
2
  import pandas as pd
3
+ import plotly.express as px
4
  import matplotlib.pyplot as plt
5
  import sahi.utils.file
6
  from PIL import Image
 
205
  col1,col2,col3 = st.columns([1,4,1])
206
  with col2:
207
  chart_data = st.session_state["output_4"]
208
+ fig = px.bar(chart_data, x='category', y='count')
209
+ st.plotly_chart(fig,use_container_width=True )
 
 
210
 
211