whitphx HF staff commited on
Commit
7657e9d
1 Parent(s): 065d436

Add a file uploader sample

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -34,3 +34,9 @@ filtered_data = data[data[DATE_COLUMN].dt.hour == hour_to_filter]
34
 
35
  st.subheader('Map of all pickups at %s:00' % hour_to_filter)
36
  st.map(filtered_data)
 
 
 
 
 
 
 
34
 
35
  st.subheader('Map of all pickups at %s:00' % hour_to_filter)
36
  st.map(filtered_data)
37
+
38
+ uploaded_file = st.file_uploader("Choose a file")
39
+ if uploaded_file is not None:
40
+ st.write(uploaded_file.name)
41
+ bytes_data = uploaded_file.getvalue()
42
+ st.write(len(bytes_data), "bytes")