Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -46,11 +46,11 @@ class GEOSEOApp:
|
|
| 46 |
temperature=0.1
|
| 47 |
)
|
| 48 |
|
| 49 |
-
# Updated embeddings initialization
|
| 50 |
self.embeddings = HuggingFaceEmbeddings(
|
| 51 |
model_name="sentence-transformers/all-MiniLM-L6-v2",
|
| 52 |
cache_folder="./hf_cache",
|
| 53 |
-
device
|
| 54 |
)
|
| 55 |
|
| 56 |
def setup_parsers(self):
|
|
|
|
| 46 |
temperature=0.1
|
| 47 |
)
|
| 48 |
|
| 49 |
+
# Updated embeddings initialization without the `device` parameter
|
| 50 |
self.embeddings = HuggingFaceEmbeddings(
|
| 51 |
model_name="sentence-transformers/all-MiniLM-L6-v2",
|
| 52 |
cache_folder="./hf_cache",
|
| 53 |
+
model_kwargs={'device': 'cpu'} # Ensure the model loads on CPU
|
| 54 |
)
|
| 55 |
|
| 56 |
def setup_parsers(self):
|