ncardian commited on
Commit
dc25ea7
·
verified ·
1 Parent(s): 3ae989a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -11
app.py CHANGED
@@ -14,9 +14,7 @@ from typing import Optional, List
14
  import plotly.express as px
15
  import plotly.graph_objects as go
16
  import os
17
- import plotly.io as pio
18
- import streamlit.components.v1 as components
19
- pio.renderers.default = "iframe_connected"
20
 
21
  GROQ_API_KEY = os.environ.get("GROQ_TOKENS")
22
 
@@ -1027,13 +1025,7 @@ with col2a: # Sidebar untuk chatbot
1027
  categoryarray=ordered_categories,
1028
  )
1029
  )
1030
- config = {
1031
- 'scrollZoom': True, # Zoom dengan scroll mouse
1032
- 'displayModeBar': True, # Tampilkan toolbar
1033
- 'responsive': True # Responsive design
1034
- }
1035
- html = fig.to_html(include_plotlyjs='cdn')
1036
- components.html(html, height=300)
1037
 
1038
  elif pd.api.types.is_numeric_dtype(col_data):
1039
  st.write("**Distribution**")
@@ -1060,7 +1052,7 @@ with col2a: # Sidebar untuk chatbot
1060
  font=dict(family="Verdana", size=13),
1061
  )
1062
 
1063
- st.plotly_chart(fig, use_container_width=True)
1064
 
1065
  else:
1066
  st.write("**Value counts (top 20):**")
 
14
  import plotly.express as px
15
  import plotly.graph_objects as go
16
  import os
17
+
 
 
18
 
19
  GROQ_API_KEY = os.environ.get("GROQ_TOKENS")
20
 
 
1025
  categoryarray=ordered_categories,
1026
  )
1027
  )
1028
+ st.plotly_chart(fig, use_container_width=True, config={"responsive": True})
 
 
 
 
 
 
1029
 
1030
  elif pd.api.types.is_numeric_dtype(col_data):
1031
  st.write("**Distribution**")
 
1052
  font=dict(family="Verdana", size=13),
1053
  )
1054
 
1055
+ st.plotly_chart(fig, use_container_width=True, config={"responsive": True})
1056
 
1057
  else:
1058
  st.write("**Value counts (top 20):**")