pragneshbarik commited on
Commit
6ec5095
1 Parent(s): 2dee873

upgraded to mistral 7b v0.2

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -18,7 +18,8 @@ pinecone.init(
18
  pinecone_index = pinecone.Index('ikigai-chat')
19
  text_vectorizer = SentenceTransformer('all-distilroberta-v1')
20
  chat_bots = {
21
- "Mistral 7B" : "mistralai/Mistral-7B-Instruct-v0.1",
 
22
  "Zephyr 7B-beta": "HuggingFaceH4/zephyr-7b-beta",
23
  "Zephyr 7B-alpha" : "HuggingFaceH4/zephyr-7b-alpha",
24
  }
@@ -72,7 +73,7 @@ def gen_augmented_prompt(prompt, top_k) :
72
 
73
  data = {
74
  "Attribute": ["LLM", "Text Vectorizer", "Vector Database","CPU", "System RAM"],
75
- "Information": ["Mistral-7B-Instruct-v0.1","all-distilroberta-v1", "Hosted Pinecone" ,"2 vCPU", "16 GB"]
76
  }
77
  df = pd.DataFrame(data)
78
 
@@ -107,7 +108,7 @@ if "rag_enabled" not in st.session_state :
107
  st.session_state.rag_enabled = True
108
 
109
  if "chat_bot" not in st.session_state :
110
- st.session_state.chat_bot = "Mistral 7B"
111
 
112
  with st.sidebar:
113
  st.markdown("# Retrieval Settings")
@@ -204,7 +205,7 @@ if prompt := st.chat_input("Chat with Ikigai Docs..."):
204
  len_response = (len(prompt.split()) + len(full_response.split())) * 1.25
205
  st.session_state["tokens_used"] = len_response + st.session_state["tokens_used"]
206
 
207
- if st.session_state["tokens_used"] > 15000 :
208
  st.session_state.history = st.session_state.history[-3:]
209
 
210
  st.session_state.history.append([prompt, full_response])
 
18
  pinecone_index = pinecone.Index('ikigai-chat')
19
  text_vectorizer = SentenceTransformer('all-distilroberta-v1')
20
  chat_bots = {
21
+ "Mistral 7B v0.2" : "mistralai/Mistral-7B-Instruct-v0.2",
22
+ "Mistral 7B v0.1" : "mistralai/Mistral-7B-Instruct-v0.1",
23
  "Zephyr 7B-beta": "HuggingFaceH4/zephyr-7b-beta",
24
  "Zephyr 7B-alpha" : "HuggingFaceH4/zephyr-7b-alpha",
25
  }
 
73
 
74
  data = {
75
  "Attribute": ["LLM", "Text Vectorizer", "Vector Database","CPU", "System RAM"],
76
+ "Information": ["Mistral-7B-Instruct-v0.2","all-distilroberta-v1", "Hosted Pinecone" ,"2 vCPU", "16 GB"]
77
  }
78
  df = pd.DataFrame(data)
79
 
 
108
  st.session_state.rag_enabled = True
109
 
110
  if "chat_bot" not in st.session_state :
111
+ st.session_state.chat_bot = "Mistral 7B v0.2"
112
 
113
  with st.sidebar:
114
  st.markdown("# Retrieval Settings")
 
205
  len_response = (len(prompt.split()) + len(full_response.split())) * 1.25
206
  st.session_state["tokens_used"] = len_response + st.session_state["tokens_used"]
207
 
208
+ if st.session_state["tokens_used"] > 12000 :
209
  st.session_state.history = st.session_state.history[-3:]
210
 
211
  st.session_state.history.append([prompt, full_response])