ambreshrc commited on
Commit
2f2160a
1 Parent(s): 99a70c2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -83,7 +83,8 @@ def btTranslator(docxfile):
83
  translated_text = "\n".join(translated_paragraphs)
84
  bigtext=translated_text
85
  files.add_paragraph(bigtext)
86
- #files=files.save("Translated.docx")
 
87
  #binary_output = BytesIO()
88
  #f=files.save(binary_output)
89
  #f2=f.getvalue()
@@ -107,6 +108,7 @@ if st.button(label='Translate'):
107
  st.success("Translated")
108
 
109
  st.download_button(label='Download Translated File',file_name=(f"{name}_Translated.docx"), data=binary_output.getvalue())
 
110
  #else:
111
  # st.text('Upload File and Start the process')
112
 
 
83
  translated_text = "\n".join(translated_paragraphs)
84
  bigtext=translated_text
85
  files.add_paragraph(bigtext)
86
+ #files2save=files.save("Translated.docx")
87
+ #files.save("Translated.docx")
88
  #binary_output = BytesIO()
89
  #f=files.save(binary_output)
90
  #f2=f.getvalue()
 
108
  st.success("Translated")
109
 
110
  st.download_button(label='Download Translated File',file_name=(f"{name}_Translated.docx"), data=binary_output.getvalue())
111
+ files.save(f"{name}_Translated.docx")
112
  #else:
113
  # st.text('Upload File and Start the process')
114