jcmachicao's picture
Rename edusights.py to app.py
d9bed3b verified
raw
history blame
576 Bytes
import streamlit as st
st.title("Carga de Archivo PKL")
uploaded_file = st.file_uploader("Choose a file")
if uploaded_file is not None:
bytes_data = uploaded_file.getvalue()
string_data = bytes_data.decode("utf-8")
st.write("File content as bytes:", bytes_data)
st.write("File content as string:", string_data)
st.text_area("File content", string_data, height=300)
with open(uploaded_file.name, "wb") as f:
f.write(bytes_data)
st.success(f"Archivo {uploaded_file.name} leido exitosamente.")
st.write("Upload a file to see its content")