Spaces:
Runtime error
Runtime error
achuthc1298
commited on
Commit
•
5f2d2f5
1
Parent(s):
cd3b67b
Update app.py
Browse files
app.py
CHANGED
@@ -20,7 +20,8 @@ def create_doc_tools(document_fp: str, doc_name: str, verbose: bool = True) -> T
|
|
20 |
documents = SimpleDirectoryReader(input_files=[document_fp]).load_data()
|
21 |
|
22 |
llm = Groq(model="mixtral-8x7b-32768")
|
23 |
-
|
|
|
24 |
Settings.llm = llm
|
25 |
Settings.embed_model = embed_model
|
26 |
|
|
|
20 |
documents = SimpleDirectoryReader(input_files=[document_fp]).load_data()
|
21 |
|
22 |
llm = Groq(model="mixtral-8x7b-32768")
|
23 |
+
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
24 |
+
embed_model = HuggingFaceEmbedding(model_name="sentence-transformers/all-mpnet-base-v2", device=device)
|
25 |
Settings.llm = llm
|
26 |
Settings.embed_model = embed_model
|
27 |
|