Mel Nguyen (she/her) commited on
Commit
e8da2f4
1 Parent(s): f546c1a

update output

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -25,7 +25,7 @@ else:
25
  if st.button("Run"):
26
  with st.spinner("Working Hard..."):
27
  translator = pipeline('translation', model=model, tokenizer=tokenizer, src_lang=src_lang, tgt_lang=tgt_lang)
28
- trans_text = translator(sent)
29
  st.write(trans_text)
30
  st.success("Done!")
31
 
 
25
  if st.button("Run"):
26
  with st.spinner("Working Hard..."):
27
  translator = pipeline('translation', model=model, tokenizer=tokenizer, src_lang=src_lang, tgt_lang=tgt_lang)
28
+ trans_text = translator(sent)[0]["translation_text"]
29
  st.write(trans_text)
30
  st.success("Done!")
31