Spaces:
Sleeping
Sleeping
cryptocalypse
commited on
Commit
•
a072676
1
Parent(s):
3287a07
Update gen.py
Browse files
gen.py
CHANGED
@@ -153,9 +153,9 @@ prompt = (
|
|
153 |
|
154 |
def generate(event):
|
155 |
# Generar el texto usando el modelo
|
156 |
-
|
157 |
inputs = tokenizer.apply_chat_template(
|
158 |
-
|
159 |
add_generation_prompt=True,
|
160 |
return_tensors='pt'
|
161 |
)
|
|
|
153 |
|
154 |
def generate(event):
|
155 |
# Generar el texto usando el modelo
|
156 |
+
prompt_msg = [{'role':'system','content':prompt},{'role': 'user', 'content': event}]
|
157 |
inputs = tokenizer.apply_chat_template(
|
158 |
+
prompt_msg,
|
159 |
add_generation_prompt=True,
|
160 |
return_tensors='pt'
|
161 |
)
|