asitts commited on
Commit
767dee0
Β·
1 Parent(s): 7b36969

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -5,7 +5,7 @@ import openai
5
  from llama_index import SimpleDirectoryReader
6
 
7
  st.set_page_config(page_title="You & AI - Parks", page_icon="πŸ‚", layout="centered", initial_sidebar_state="auto", menu_items=None)
8
- openai.api_key = "1234"
9
  st.title("Personalize Your Parks Experience πŸ’¬πŸ‚πŸ€–")
10
  st.info("Check out more info on DC Parks & Rec at our [website](https://dpr.dc.gov/)", icon="πŸ“ƒ")
11
 
@@ -16,7 +16,7 @@ if "messages" not in st.session_state.keys(): # Initialize the chat messages his
16
 
17
  @st.cache_resource(show_spinner=False)
18
  def load_data():
19
- with st.spinner(text="Loading and indexing the Streamlit docs – hang tight! This should take 1-2 minutes."):
20
  reader = SimpleDirectoryReader(input_dir="./data", recursive=True)
21
  docs = reader.load_data()
22
  service_context = ServiceContext.from_defaults(llm=OpenAI(model="gpt-3.5-turbo", temperature=0.5, system_prompt="You are an expert on the Streamlit Python library and your job is to answer technical questions. Assume that all questions are related to the Streamlit Python library. Keep your answers technical and based on facts – do not hallucinate features."))
 
5
  from llama_index import SimpleDirectoryReader
6
 
7
  st.set_page_config(page_title="You & AI - Parks", page_icon="πŸ‚", layout="centered", initial_sidebar_state="auto", menu_items=None)
8
+ openai.api_key = "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"
9
  st.title("Personalize Your Parks Experience πŸ’¬πŸ‚πŸ€–")
10
  st.info("Check out more info on DC Parks & Rec at our [website](https://dpr.dc.gov/)", icon="πŸ“ƒ")
11
 
 
16
 
17
  @st.cache_resource(show_spinner=False)
18
  def load_data():
19
+ with st.spinner(text="Loading and indexing the DC Parks & Rec docs – hang tight! This should take 1-2 minutes."):
20
  reader = SimpleDirectoryReader(input_dir="./data", recursive=True)
21
  docs = reader.load_data()
22
  service_context = ServiceContext.from_defaults(llm=OpenAI(model="gpt-3.5-turbo", temperature=0.5, system_prompt="You are an expert on the Streamlit Python library and your job is to answer technical questions. Assume that all questions are related to the Streamlit Python library. Keep your answers technical and based on facts – do not hallucinate features."))