Update app.py
Browse files
app.py
CHANGED
@@ -10,9 +10,9 @@ css = ".output-image{height: 528px !important} .output-carousel .output-image{he
|
|
10 |
|
11 |
|
12 |
|
13 |
-
def translate(
|
14 |
inputs = tokenizer.encode(
|
15 |
-
|
16 |
outputs = model.generate(
|
17 |
inputs, max_length=128, num_beams=None, early_stopping=True)
|
18 |
|
|
|
10 |
|
11 |
|
12 |
|
13 |
+
def translate(hindi_sentence):
|
14 |
inputs = tokenizer.encode(
|
15 |
+
hindi_sentence, return_tensors="pt",padding=True,max_length=512,truncation=True)
|
16 |
outputs = model.generate(
|
17 |
inputs, max_length=128, num_beams=None, early_stopping=True)
|
18 |
|