abhisheksan commited on
Commit
af80dec
1 Parent(s): 2e998d1

Fix initialization check in ModelManager to use class variable for singleton pattern

Browse files
Files changed (1) hide show
  1. app/services/poetry_generation.py +1 -1
app/services/poetry_generation.py CHANGED
@@ -12,7 +12,7 @@ class ModelManager:
12
  return cls._instance
13
 
14
  def __init__(self):
15
- if not self._initialized:
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