bstraehle commited on
Commit
a99ba01
·
verified ·
1 Parent(s): 160048e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -5
app.py CHANGED
@@ -127,12 +127,8 @@ def prompt_model(model_name, system_prompt, user_prompt, sql_schema):
127
 
128
  def load_model(model_name):
129
  model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto")
130
- #tokenizer = AutoTokenizer.from_pretrained(model_name)
131
- tokenizer = model.tokenizer
132
 
133
- model.generation_config.pad_token_id = tokenizer.pad_token_id
134
-
135
- return model, tokenizer
136
 
137
  demo = gr.Interface(fn=process,
138
  inputs=[gr.Radio([ACTION_1, ACTION_2, ACTION_3], label = "Action", value = ACTION_3),
 
127
 
128
  def load_model(model_name):
129
  model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto")
 
 
130
 
131
+ return model, model.tokenizer
 
 
132
 
133
  demo = gr.Interface(fn=process,
134
  inputs=[gr.Radio([ACTION_1, ACTION_2, ACTION_3], label = "Action", value = ACTION_3),