text: import streamlit as st
  import base64
  import os
  import time
  from pdf2docx import Converter
  
  timestr = time.strftime("%Y%m%d-%H%M%S")
  
  def show_pdf(file_path):
      with open(file_path,"rb") as f:
            base64_pdf = base64.b64encode(f.read()).decode('utf-8')
      pdf_display = f'<embed src="data:application/pdf;base64,{base64_pdf}" width="700" height="1000" type="application/pdf">'
      st.markdown(pdf_display, unsafe_allow_html=True)
  
  
  class FileDownloader(object):
  	
  	def __init__(self, data,filename='myfile',file_ext='pdf'):
  		super(FileDownloader, self).__init__()
  		self.data = data
  		self.filename = filename
  		self.file_ext = file_ext
  
  	def download(self):
  		b64 = base64.b64encode(self.data.encode()).decode()
  		new_filename = "{}_{}_.{}".format(self.filename,timestr,self.file_ext)
  		st.markdown("#### Download File ###")
  		href = f'<a href="data:file/{self.file_ext};base64,{b64}" download="{new_filename}">Click Here!!</a>'
  		st.markdown(href,unsafe_allow_html=True)
  
  def save_uploadedfile(uploadedfile):
       with open(os.path.join("tempDir",uploadedfile.name),"wb") as f:
           f.write(uploadedfile.getbuffer())
       return st.success("Saved File:{} to tempDir".format(uploadedfile.name))
  
  
  
  import  streamlit as st
  
  def convert2docx():
      uploaded_file = st.file_uploader("")
      cv = Converter(uploaded_file)
      docx_file = cv.convert( start=0, end=None)