Spaces:
Runtime error
Runtime error
ishaan-mital
commited on
Commit
·
64fe6cc
1
Parent(s):
083f629
initial commit
Browse files
app.py
CHANGED
@@ -11,8 +11,12 @@ API_URL = "https://api-inference.huggingface.co/models/HuggingFaceH4/zephyr-7b-b
|
|
11 |
# retrieval = Client("https://ishaan-mital-ncert-helper-vector-db.hf.space/--replicas/149bg26k5/")
|
12 |
|
13 |
embed_model_id = 'sentence-transformers/all-MiniLM-L6-v2'
|
|
|
|
|
14 |
embed_model = HuggingFaceEmbeddings(
|
15 |
model_name=embed_model_id,
|
|
|
|
|
16 |
)
|
17 |
|
18 |
|
|
|
11 |
# retrieval = Client("https://ishaan-mital-ncert-helper-vector-db.hf.space/--replicas/149bg26k5/")
|
12 |
|
13 |
embed_model_id = 'sentence-transformers/all-MiniLM-L6-v2'
|
14 |
+
# device = f'cuda:{cuda.current_device()}' if cuda.is_available() else 'cpu'
|
15 |
+
|
16 |
embed_model = HuggingFaceEmbeddings(
|
17 |
model_name=embed_model_id,
|
18 |
+
# model_kwargs={'device': device},
|
19 |
+
# encode_kwargs={'device': device, 'batch_size': 32}
|
20 |
)
|
21 |
|
22 |
|