I am trying to call a download button after text input is done. The problem is, download button always pop up at top of text input button.
my code:
import os
import streamlit as st
filelist = []
for root, dirs, files in os.walk("/home/lungsang/Desktop/levelpack-UI/content/A0/1 docx-raw"):
for file in files:
filename = os.path.join(root, file)
filelist.append(filename)
with st.expander(" 1 docx-raw"):
st.write(filelist)
def proc():
for file in filename:
if st.session.text_key == file:
st.download_button('Download file', data=file)
if __name__ == '__main__':
st.text_input('Please insert the name of file to be download', on_change=proc, key='text_key')
In below image : download button came up on text input button. I need it below :)
