AI-RESEARCHER-2024 commited on
Commit
1dff132
1 Parent(s): 3ef59eb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -0
app.py CHANGED
@@ -3,8 +3,23 @@ from langchain_openai import ChatOpenAI
3
  from langchain.chains import RetrievalQA
4
  from langchain.vectorstores import Chroma
5
  from langchain_community.embeddings import HuggingFaceEmbeddings
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  embeddings = HuggingFaceEmbeddings(model_name="sentence-transformers/all-MiniLM-L6-v2")
7
 
 
8
  llm = llm = ChatOpenAI(
9
  api_key="ollama",
10
  model='llama3.2',
 
3
  from langchain.chains import RetrievalQA
4
  from langchain.vectorstores import Chroma
5
  from langchain_community.embeddings import HuggingFaceEmbeddings
6
+
7
+ import os
8
+ import sys
9
+
10
+ # get model name
11
+ model = 'llama3.2'
12
+
13
+ # start the server
14
+ os.system('ollama serve &')
15
+ # pull the model
16
+ os.system(f'ollama pull {model}')
17
+ # verify the contents
18
+ os.system(f'ollama pull {model}')
19
+
20
  embeddings = HuggingFaceEmbeddings(model_name="sentence-transformers/all-MiniLM-L6-v2")
21
 
22
+
23
  llm = llm = ChatOpenAI(
24
  api_key="ollama",
25
  model='llama3.2',