import os UPLOAD_DIR = "uploads" os.makedirs(UPLOAD_DIR, exist_ok=True) def save_uploads(files): """ Save multiple uploaded files from Streamlit """ saved_paths = [] for file in files: path = os.path.join(UPLOAD_DIR, file.name) with open(path, "wb") as f: f.write(file.getbuffer()) saved_paths.append(path) return saved_paths