Waflon commited on
Commit
df7bc3a
1 Parent(s): 207b927

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -7,6 +7,7 @@ from langchain.llms import CTransformers
7
  from langchain.text_splitter import RecursiveCharacterTextSplitter
8
  from langchain.vectorstores import FAISS
9
  from langchain.memory import ConversationBufferMemory
 
10
 
11
  from huggingface_hub import login
12
  login(token =st.secrets["HF"])
@@ -41,7 +42,8 @@ def load_vector_store(nombre_vector, embeddings):
41
 
42
  # Function to create LLMS model
43
  def create_llms_model():
44
- llm = CTransformers(model='TheBloke/Mistral-7B-Instruct-v0.1-GGUF', config={'max_new_tokens': 128, 'temperature': 0.01})
 
45
  return llm
46
 
47
  # Initialize Streamlit app
 
7
  from langchain.text_splitter import RecursiveCharacterTextSplitter
8
  from langchain.vectorstores import FAISS
9
  from langchain.memory import ConversationBufferMemory
10
+ from langchain_openai import ChatOpenAI
11
 
12
  from huggingface_hub import login
13
  login(token =st.secrets["HF"])
 
42
 
43
  # Function to create LLMS model
44
  def create_llms_model():
45
+ #llm = CTransformers(model='TheBloke/Mistral-7B-Instruct-v0.1-GGUF', config={'max_new_tokens': 128, 'temperature': 0.01})
46
+ llm = ChatOpenAI(model='gpt-3.5-turbo-1106', temperature=0.1)
47
  return llm
48
 
49
  # Initialize Streamlit app