dangerous_deserialization
Browse files
app.py
CHANGED
|
@@ -1,6 +1,11 @@
|
|
| 1 |
import os
|
| 2 |
os.environ["CUDA_VISIBLE_DEVICES"] = "" # Disable CUDA initialization
|
| 3 |
os.environ["allow_dangerous_deserialization"] = "True"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
import spaces
|
| 6 |
import sys
|
|
|
|
| 1 |
import os
|
| 2 |
os.environ["CUDA_VISIBLE_DEVICES"] = "" # Disable CUDA initialization
|
| 3 |
os.environ["allow_dangerous_deserialization"] = "True"
|
| 4 |
+
print(os.getcwd())
|
| 5 |
+
embedding_path="/docs/_embeddings/index.faiss"
|
| 6 |
+
print(f"Loading FAISS index from: {embedding_path}")
|
| 7 |
+
if not os.path.exists(embedding_path):
|
| 8 |
+
print("File not found!")
|
| 9 |
|
| 10 |
import spaces
|
| 11 |
import sys
|