ambreshrc commited on
Commit
cb7c3ae
1 Parent(s): a4821cd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -96,10 +96,16 @@ st.sidebar.subheader("File Upload")
96
 
97
  datas=st.sidebar.file_uploader("Original File")
98
  #data=getText("C:\Users\Ambresh C\Desktop\Python Files\Translators\Trail Doc of 500 words.docx")
 
99
  binary_output = BytesIO()
100
  f3=btTranslator(datas).save(binary_output)
 
 
 
 
 
101
  #f4=binary_output(f3)
102
 
103
- st.sidebar.download_button(label='Download Translated File',file_name='Translated.docx', data=binary_output.getvalue())
104
  # st.text_area(label="",value=btTranslator(datas),height=100)
105
  # Footer
 
96
 
97
  datas=st.sidebar.file_uploader("Original File")
98
  #data=getText("C:\Users\Ambresh C\Desktop\Python Files\Translators\Trail Doc of 500 words.docx")
99
+
100
  binary_output = BytesIO()
101
  f3=btTranslator(datas).save(binary_output)
102
+
103
+ if datas :
104
+ st.sidebar.download_button(label='Download Translated File',file_name='Translated.docx', data=binary_output.getvalue())
105
+
106
+
107
  #f4=binary_output(f3)
108
 
109
+ #st.sidebar.download_button(label='Download Translated File',file_name='Translated.docx', data=binary_output.getvalue())
110
  # st.text_area(label="",value=btTranslator(datas),height=100)
111
  # Footer