aiscientist commited on
Commit
66e32da
·
verified ·
1 Parent(s): 8d7cdd2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -1,6 +1,6 @@
1
  import streamlit as st
2
  import os
3
- os.environ['OPENAI_API_KEY'] = "your key"
4
 
5
  from langchain.llms.openai import OpenAI
6
  from langchain.agents.agent_types import AgentType
@@ -11,7 +11,12 @@ import time
11
  def main():
12
  st.title("Personal Assistant")
13
 
14
- csv_file_path = "personal.csv"
 
 
 
 
 
15
  llm = OpenAI(temperature=0)
16
  agent = create_csv_agent(
17
  llm,
 
1
  import streamlit as st
2
  import os
3
+ os.environ['OPENAI_API_KEY'] = "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"
4
 
5
  from langchain.llms.openai import OpenAI
6
  from langchain.agents.agent_types import AgentType
 
11
  def main():
12
  st.title("Personal Assistant")
13
 
14
+ uploaded_file = st.file_uploader("Upload CSV file", type=["csv"])
15
+ if uploaded_file is not None:
16
+ csv_file_path = uploaded_file.name
17
+ else:
18
+ csv_file_path = "personal.csv"
19
+
20
  llm = OpenAI(temperature=0)
21
  agent = create_csv_agent(
22
  llm,