Spaces:
Sleeping
Sleeping
import streamlit as st | |
import os | |
def save_uploaded_file(uploaded_file): | |
try: | |
file_path = os.path.join('uploaded', uploaded_file.name) | |
with open(file_path, 'wb') as f: | |
f.write(uploaded_file.getvalue()) | |
return file_path | |
except Exception as e: | |
st.error(f"Error: {e}") | |
return None |