Nishan30 commited on
Commit
cf4d218
·
verified ·
1 Parent(s): 5e66834

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -40,7 +40,6 @@ webhook.to(slack);
40
  # MODEL LOADING
41
  # ==============================================================================
42
 
43
- @gr.cache
44
  def load_model():
45
  """Load model once and cache it"""
46
  print("Loading model...")
@@ -60,8 +59,10 @@ def load_model():
60
  print("Model loaded successfully!")
61
  return model, tokenizer
62
 
63
- # Load model at startup
 
64
  model, tokenizer = load_model()
 
65
 
66
  # ==============================================================================
67
  # CODE GENERATION
 
40
  # MODEL LOADING
41
  # ==============================================================================
42
 
 
43
  def load_model():
44
  """Load model once and cache it"""
45
  print("Loading model...")
 
59
  print("Model loaded successfully!")
60
  return model, tokenizer
61
 
62
+ # Load model at startup (global variable for caching)
63
+ print("🔄 Loading model at startup...")
64
  model, tokenizer = load_model()
65
+ print("✅ Model loaded and ready!")
66
 
67
  # ==============================================================================
68
  # CODE GENERATION