Update app.py
Browse files
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.
|
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),
|