asitts commited on
Commit
ceb7a0d
Β·
1 Parent(s): 9e874cf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -4,9 +4,9 @@ from llama_index.llms import OpenAI
4
  import openai
5
  from llama_index import SimpleDirectoryReader
6
 
7
- st.set_page_config(page_title="Chat with the Streamlit docs, powered by LlamaIndex", page_icon="πŸ¦™", layout="centered", initial_sidebar_state="auto", menu_items=None)
8
- openai.api_key = "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"
9
- st.title("Chat with the Streamlit docs, powered by LlamaIndex πŸ’¬πŸ¦™")
10
  st.info("Check out the full tutorial to build this app in our [blog post](https://blog.streamlit.io/build-a-chatbot-with-custom-data-sources-powered-by-llamaindex/)", icon="πŸ“ƒ")
11
 
12
  if "messages" not in st.session_state.keys(): # Initialize the chat messages history
@@ -24,7 +24,7 @@ def load_data():
24
  return index
25
 
26
  index = load_data()
27
- # chat_engine = index.as_chat_engine(chat_mode="condense_question", verbose=True, 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.")
28
  chat_engine = index.as_chat_engine(chat_mode="condense_question", verbose=True)
29
 
30
  if prompt := st.chat_input("Your question"): # Prompt for user input and save to chat history
 
4
  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 the full tutorial to build this app in our [blog post](https://blog.streamlit.io/build-a-chatbot-with-custom-data-sources-powered-by-llamaindex/)", icon="πŸ“ƒ")
11
 
12
  if "messages" not in st.session_state.keys(): # Initialize the chat messages history
 
24
  return index
25
 
26
  index = load_data()
27
+ #chat_engine = index.as_chat_engine(chat_mode="condense_question", verbose=True, 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.")
28
  chat_engine = index.as_chat_engine(chat_mode="condense_question", verbose=True)
29
 
30
  if prompt := st.chat_input("Your question"): # Prompt for user input and save to chat history