TestChat / app.py
w3robotics's picture
Update app.py
7d7cace verified
raw
history blame
439 Bytes
import streamlit as st
import os
x = st.slider('Select a value')
st.write(x, 'squared is', x * x)
uploaded_file = st.file_uploader("Upload File")
if uploaded_file is not None:
file_details = {"FileName":uploaded_file.name,"FileType":uploaded_file.type}
st.write(file_details)
with open(os.path.join("tempDir",uploaded_file.name),"wb") as f:
f.write(uploaded_file.getbuffer())
st.success("Saved File")