bstraehle commited on
Commit
96edae0
1 Parent(s): 7d8f22c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -143,8 +143,8 @@ def prompt_model(model_name, system_prompt, user_prompt, sql_context):
143
  return result
144
 
145
  def load_model(model_name):
146
- #model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto")
147
- model = PeftModel.from_pretrained(model_id=model_name, device_map="auto")
148
  tokenizer = AutoTokenizer.from_pretrained(model_name)
149
  tokenizer.pad_token = tokenizer.eos_token
150
 
 
143
  return result
144
 
145
  def load_model(model_name):
146
+ model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto")
147
+ peft_model = PeftModel.from_pretrained(model, model_id=model_name, device_map="auto")
148
  tokenizer = AutoTokenizer.from_pretrained(model_name)
149
  tokenizer.pad_token = tokenizer.eos_token
150