Staticaliza commited on
Commit
73a9d32
·
verified ·
1 Parent(s): 0da99be

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -9,12 +9,12 @@ model_id = "xmadai/Mistral-Large-Instruct-2407-xMADai-INT4"
9
  # Load the tokenizer
10
  tokenizer = AutoTokenizer.from_pretrained(model_id, use_fast=False, trust_remote_code=True)
11
 
12
- @spaces.DynamicGpuSupport()
13
  class ModelWrapper:
14
  def __init__(self):
15
  self.model = None # Model will be loaded when GPU is allocated
16
 
17
- @spaces.GPU
18
  def generate(self, prompt):
19
  if self.model is None:
20
  # Load the model when GPU is allocated
 
9
  # Load the tokenizer
10
  tokenizer = AutoTokenizer.from_pretrained(model_id, use_fast=False, trust_remote_code=True)
11
 
12
+ # Removed the invalid decorator
13
  class ModelWrapper:
14
  def __init__(self):
15
  self.model = None # Model will be loaded when GPU is allocated
16
 
17
+ @spaces.GPU # Use the correct decorator
18
  def generate(self, prompt):
19
  if self.model is None:
20
  # Load the model when GPU is allocated