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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -15,6 +15,7 @@ import plotly.express as px
15
  import plotly.graph_objects as go
16
  import os
17
  import plotly.io as pio
 
18
  pio.renderers.default = "iframe_connected"
19
 
20
  GROQ_API_KEY = os.environ.get("GROQ_TOKENS")
@@ -1031,8 +1032,8 @@ with col2a: # Sidebar untuk chatbot
1031
  'displayModeBar': True, # Tampilkan toolbar
1032
  'responsive': True # Responsive design
1033
  }
1034
-
1035
- st.plotly_chart(fig, use_container_width=True, config=config)
1036
 
1037
  elif pd.api.types.is_numeric_dtype(col_data):
1038
  st.write("**Distribution**")
 
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")
 
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**")