Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,10 +11,11 @@ except ImportError as e:
|
|
| 11 |
print("📦 Required packages: torch, sentence-transformers, chromadb")
|
| 12 |
|
| 13 |
# Global variables for model and collection (initialized lazily)
|
| 14 |
-
model = None
|
| 15 |
-
collection = None
|
| 16 |
-
device = None
|
| 17 |
config = Config()
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
class EmbeddingGemmaPrompts:
|
| 20 |
"""
|
|
|
|
| 11 |
print("📦 Required packages: torch, sentence-transformers, chromadb")
|
| 12 |
|
| 13 |
# Global variables for model and collection (initialized lazily)
|
|
|
|
|
|
|
|
|
|
| 14 |
config = Config()
|
| 15 |
+
device = Config.get_device()
|
| 16 |
+
model = SentenceTransformer(config.MODEL_PATH)
|
| 17 |
+
collection = None
|
| 18 |
+
|
| 19 |
|
| 20 |
class EmbeddingGemmaPrompts:
|
| 21 |
"""
|