Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -30,6 +30,19 @@ EMBEDDING_MODEL_NAME = "thenlper/gte-base"
|
|
| 30 |
CHUNK_SIZE = 500
|
| 31 |
BATCH_SIZE = 32
|
| 32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
# Model initialization
|
| 34 |
model = None
|
| 35 |
|
|
|
|
| 30 |
CHUNK_SIZE = 500
|
| 31 |
BATCH_SIZE = 32
|
| 32 |
|
| 33 |
+
# === Custom Exceptions ===
|
| 34 |
+
class ModelLoadingError(Exception):
|
| 35 |
+
pass
|
| 36 |
+
|
| 37 |
+
class FileProcessingError(Exception):
|
| 38 |
+
pass
|
| 39 |
+
|
| 40 |
+
class GPUQuotaExceededError(Exception):
|
| 41 |
+
pass
|
| 42 |
+
|
| 43 |
+
class VectorDBError(Exception):
|
| 44 |
+
pass
|
| 45 |
+
|
| 46 |
# Model initialization
|
| 47 |
model = None
|
| 48 |
|