Guiziii commited on
Commit
d240a47
1 Parent(s): 7f30e98

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -1
main.py CHANGED
@@ -11,7 +11,7 @@ def translate():
11
  enpt_pipeline = pipeline('text2text-generation', model=model, tokenizer=tokenizer, max_length=512, num_beams=5)
12
 
13
  content = request.json
14
- text_to translate = content['text']
15
  result = enpt_pipeline(f"translate English to Portuguese: {text_to_translate}")
16
  return jsonify({"translated_text": result[0]["generated_text"]})
17
 
 
11
  enpt_pipeline = pipeline('text2text-generation', model=model, tokenizer=tokenizer, max_length=512, num_beams=5)
12
 
13
  content = request.json
14
+ text_to_translate = content['text']
15
  result = enpt_pipeline(f"translate English to Portuguese: {text_to_translate}")
16
  return jsonify({"translated_text": result[0]["generated_text"]})
17