Spaces:
Runtime error
Runtime error
Commit
·
fc12706
1
Parent(s):
5af81e5
Update app.py
Browse files
app.py
CHANGED
@@ -61,7 +61,7 @@ def chat():
|
|
61 |
|
62 |
vector_db = Chroma.from_documents(
|
63 |
documents,
|
64 |
-
embeddings = HuggingFaceBgeEmebddings(model_name=model_name, model_kwargs={'device'
|
65 |
)
|
66 |
repo_id = "tiiuae/falcon-7b-instruct"
|
67 |
qa_chain = RetrievalQA.from_chain_type(
|
|
|
61 |
|
62 |
vector_db = Chroma.from_documents(
|
63 |
documents,
|
64 |
+
embeddings = HuggingFaceBgeEmebddings(model_name=model_name, model_kwargs={'device': 'cuda' if torch.cuda.is_available() else 'cpu'}, encode_kwargs=encode_kwargs)
|
65 |
)
|
66 |
repo_id = "tiiuae/falcon-7b-instruct"
|
67 |
qa_chain = RetrievalQA.from_chain_type(
|