eagle0504 commited on
Commit
c246f1e
·
verified ·
1 Parent(s): 065856f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -6,6 +6,7 @@ import streamlit.components.v1 as components
6
  from pandasai import PandasAI
7
  from pandasai.llm.openai import OpenAI
8
  from streamlit_chat import message
 
9
 
10
  # Adjust the width of the Streamlit page
11
  st.set_page_config(page_title="Data Visualization ⭐", layout="wide")
@@ -86,7 +87,7 @@ if uploaded_file is not None:
86
  components.html(pyg_html, height=1000, scrolling=True)
87
 
88
  # Instantiate a LLM
89
- OPENAI_API_KEY = st.secrets["OPENAI_API_KEY"]
90
  llm = OpenAI(api_token=OPENAI_API_KEY)
91
  pandas_ai = PandasAI(llm)
92
 
 
6
  from pandasai import PandasAI
7
  from pandasai.llm.openai import OpenAI
8
  from streamlit_chat import message
9
+ import os
10
 
11
  # Adjust the width of the Streamlit page
12
  st.set_page_config(page_title="Data Visualization ⭐", layout="wide")
 
87
  components.html(pyg_html, height=1000, scrolling=True)
88
 
89
  # Instantiate a LLM
90
+ OPENAI_API_KEY = os.environ["OPENAI_API_KEY"]
91
  llm = OpenAI(api_token=OPENAI_API_KEY)
92
  pandas_ai = PandasAI(llm)
93