eaysu commited on
Commit
944d4d5
1 Parent(s): 94e2407

prints the parsed sentence

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -41,6 +41,7 @@ def translate_text(model_name, text):
41
 
42
  for sentence in sentences:
43
  # Tokenize the sentence
 
44
  tokens = tokenizer(sentence, return_tensors="pt", padding=True)
45
  if torch.cuda.is_available():
46
  tokens = {k: v.to('cuda') for k, v in tokens.items()}
 
41
 
42
  for sentence in sentences:
43
  # Tokenize the sentence
44
+ print(f"Sentence: {sentence}\n")
45
  tokens = tokenizer(sentence, return_tensors="pt", padding=True)
46
  if torch.cuda.is_available():
47
  tokens = {k: v.to('cuda') for k, v in tokens.items()}