Spaces:
Sleeping
Sleeping
Arturo Jiménez de los Galanes Reguillos
commited on
Commit
•
efce22a
1
Parent(s):
4157280
Access input properties with .
Browse files
app.py
CHANGED
@@ -38,8 +38,8 @@ def translate(python, progress=gr.Progress()):
|
|
38 |
add_generation_prompt=True,
|
39 |
return_tensors="pt")
|
40 |
inputs = tokenizer(formatted_prompt, return_tensors="pt", padding=True).to(model.device)
|
41 |
-
attention_mask = inputs
|
42 |
-
input_ids = inputs
|
43 |
|
44 |
outputs = model.generate(
|
45 |
input_ids,
|
|
|
38 |
add_generation_prompt=True,
|
39 |
return_tensors="pt")
|
40 |
inputs = tokenizer(formatted_prompt, return_tensors="pt", padding=True).to(model.device)
|
41 |
+
attention_mask = inputs.attention_mask
|
42 |
+
input_ids = inputs.input_ids
|
43 |
|
44 |
outputs = model.generate(
|
45 |
input_ids,
|