Spaces:
Runtime error
Runtime error
jonathanjordan21
commited on
Commit
•
0992338
1
Parent(s):
7c83c27
Update app.py
Browse files
app.py
CHANGED
@@ -23,8 +23,8 @@ if 'memory' not in st.session_state:
|
|
23 |
st.session_state['memory'] = ConversationBufferMemory(return_messages=True)
|
24 |
|
25 |
if 'chain' not in st.session_state:
|
26 |
-
|
27 |
-
st.session_state['chain'] = custom_chain_with_history(llm=InferenceClient("https://api-inference.huggingface.co/models/mistralai/Mixtral-8x7B-Instruct-v0.1", headers = {"Authorization": f"Bearer {API_TOKEN}"}, stream=True, max_new_tokens=512, temperature=0.01), memory=st.session_state.memory)
|
28 |
st.title("LMD Chatbot V2 Sample")
|
29 |
st.subheader("Knowledge-base from web scrapping and FAQ")
|
30 |
|
|
|
23 |
st.session_state['memory'] = ConversationBufferMemory(return_messages=True)
|
24 |
|
25 |
if 'chain' not in st.session_state:
|
26 |
+
st.session_state['chain'] = custom_chain_with_history(llm=CustomLLM(repo_id="mistralai/Mixtral-8x7B-Instruct-v0.1", model_type='text-generation', api_token=API_TOKEN, stop=["\n<|","<|"]), memory=st.session_state.memory)
|
27 |
+
# st.session_state['chain'] = custom_chain_with_history(llm=InferenceClient("https://api-inference.huggingface.co/models/mistralai/Mixtral-8x7B-Instruct-v0.1", headers = {"Authorization": f"Bearer {API_TOKEN}"}, stream=True, max_new_tokens=512, temperature=0.01), memory=st.session_state.memory)
|
28 |
st.title("LMD Chatbot V2 Sample")
|
29 |
st.subheader("Knowledge-base from web scrapping and FAQ")
|
30 |
|