File Uploader (#5)
Browse files- Add a file uploader sample (7657e9d4891015119c5ae8b06f73ba8fa25ffab7)
- Add command line arguments such as `--server.enableXsrfProtection false` that are necessary or suitable for HF Spaces (1f5003f862ef166904510feb32676b55c5a5de2b)
Co-authored-by: Yuichiro Tachibana <whitphx@users.noreply.huggingface.co>
Files changed (2)
- Dockerfile+5-1
- app.py+6
19 unmodified lines2021222319 unmodified linesCOPY . $HOME/appEXPOSE 8501CMD streamlit run app.py19 unmodified lines202122232425262719 unmodified linesCOPY . $HOME/appEXPOSE 8501CMD streamlit run app.py \--server.headless true \--server.enableCORS false \--server.enableXsrfProtection false \--server.fileWatcherType none
33 unmodified lines34353633 unmodified linesst.subheader('Map of all pickups at %s:00' % hour_to_filter)st.map(filtered_data)33 unmodified lines34353637383940414233 unmodified linesst.subheader('Map of all pickups at %s:00' % hour_to_filter)st.map(filtered_data)uploaded_file = st.file_uploader("Choose a file")if uploaded_file is not None:st.write(uploaded_file.name)bytes_data = uploaded_file.getvalue()st.write(len(bytes_data), "bytes")
Dockerfile+5-1
app.py+6