Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -19,9 +19,6 @@ def gradio_predict(input_text):
|
|
| 19 |
max_length=512 # Ensure the sequence doesn't exceed the model's max length
|
| 20 |
)
|
| 21 |
|
| 22 |
-
# Set decoder_input_ids to be the same as input_ids for initial inference
|
| 23 |
-
decoder_input_ids = input_ids # Typically, the decoder input is the same as the encoder input for translation tasks
|
| 24 |
-
|
| 25 |
# Convert tokenized inputs to numpy arrays and ensure correct shape
|
| 26 |
input_ids = np.array(tokenized_input["input_ids"], dtype=np.int64) # No need for reshape
|
| 27 |
attention_mask = np.array(tokenized_input["attention_mask"], dtype=np.int64)
|
|
|
|
| 19 |
max_length=512 # Ensure the sequence doesn't exceed the model's max length
|
| 20 |
)
|
| 21 |
|
|
|
|
|
|
|
|
|
|
| 22 |
# Convert tokenized inputs to numpy arrays and ensure correct shape
|
| 23 |
input_ids = np.array(tokenized_input["input_ids"], dtype=np.int64) # No need for reshape
|
| 24 |
attention_mask = np.array(tokenized_input["attention_mask"], dtype=np.int64)
|