Geek7 commited on
Commit
06d2ce8
·
verified ·
1 Parent(s): 7ac92d5

Update myapp.py

Browse files
Files changed (1) hide show
  1. myapp.py +1 -1
myapp.py CHANGED
@@ -17,7 +17,7 @@ model_name = "prompthero/openjourney-v4" # Replace with your model name
17
  tokenizer = AutoTokenizer.from_pretrained(model_name)
18
 
19
  # Load the model weights from safeload
20
- model = AutoModel.from_pretrained(model_name, state_dict=model_data)
21
 
22
  @myapp.route('/')
23
  def index():
 
17
  tokenizer = AutoTokenizer.from_pretrained(model_name)
18
 
19
  # Load the model weights from safeload
20
+ model = AutoModel.from_pretrained(model_name, state_dict=model_data).to("cpu")
21
 
22
  @myapp.route('/')
23
  def index():