Basically, I have this given code which allows user to select a folder for embeddings. Objective is to read the file path so I can use it later on:
# Set up tkinter
root = tk.Tk()
root.withdraw()
# Make folder picker dialog appear on top of other windows
# root.wm_attributes('-topmost', 1)
# Folder picker button
# st.title('Folder Picker')
st.write('Please select a folder which will be used to save embeddings:')
clicked = st.button('Folder Picker',type = "secondary")
# User clicked on Folder Picker button
if clicked:
chroma_file_path = st.text_input('Selected folder:', filedialog.askdirectory(master=root))
st.session_state['chroma_file_path'] = chroma_file_path
I don’t know what you are trying to achieve, but this will probably not work, because you don’t have access to the clients file system, as soon as streamlit is hosted.