Spaces:
Running
Running
abhisheksan
commited on
Commit
•
af80dec
1
Parent(s):
2e998d1
Fix initialization check in ModelManager to use class variable for singleton pattern
Browse files
app/services/poetry_generation.py
CHANGED
@@ -12,7 +12,7 @@ class ModelManager:
|
|
12 |
return cls._instance
|
13 |
|
14 |
def __init__(self):
|
15 |
-
if not
|
16 |
model_name = "meta-llama/Llama-3.2-3B-Instruct"
|
17 |
|
18 |
# Initialize tokenizer and model
|
|
|
12 |
return cls._instance
|
13 |
|
14 |
def __init__(self):
|
15 |
+
if not ModelManager._initialized:
|
16 |
model_name = "meta-llama/Llama-3.2-3B-Instruct"
|
17 |
|
18 |
# Initialize tokenizer and model
|