Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import streamlit as st
|
2 |
from langchain.llms import LlamaCpp
|
3 |
from langchain.memory import ConversationBufferMemory
|
4 |
-
from langchain.chains import
|
5 |
|
6 |
# Streamlit page configuration
|
7 |
st.set_page_config(page_title="Simple AI Chatbot")
|
@@ -10,8 +10,8 @@ st.header("Simple AI Chatbot")
|
|
10 |
# Initialize the Language Model Chain
|
11 |
@st.experimental_singleton
|
12 |
def initialize_chain():
|
13 |
-
n_gpu_layers =
|
14 |
-
n_batch =
|
15 |
|
16 |
llm = LlamaCpp(
|
17 |
model_path="models/mistral-7b-instruct-v0.1.Q5_0.gguf",
|
|
|
1 |
import streamlit as st
|
2 |
from langchain.llms import LlamaCpp
|
3 |
from langchain.memory import ConversationBufferMemory
|
4 |
+
from langchain.chains import ConversationalRetrievalChain
|
5 |
|
6 |
# Streamlit page configuration
|
7 |
st.set_page_config(page_title="Simple AI Chatbot")
|
|
|
10 |
# Initialize the Language Model Chain
|
11 |
@st.experimental_singleton
|
12 |
def initialize_chain():
|
13 |
+
n_gpu_layers = 20
|
14 |
+
n_batch = 1024
|
15 |
|
16 |
llm = LlamaCpp(
|
17 |
model_path="models/mistral-7b-instruct-v0.1.Q5_0.gguf",
|