Spaces:
Sleeping
Sleeping
Update app.py
Browse files114 unmodified lines115116117118119120121122123124125126114 unmodified lines# 2️⃣ Upload Pagedef upload_page():with gr.Column():gr.Markdown("### 📤 Upload EEG Data (and Optional Video)")eeg_file = gr.File(label="EEG CSV File", file_types=[".csv"]) # removed Required = truevideo_file = gr.Video(label="Optional Video (for synchronization)")next_btn = gr.Button("➡️ Next: Run Analysis", variant="primary")return eeg_file, video_file, next_btn# 3️⃣ Analysis Pagedef analysis_page():114 unmodified lines115116117118119120121122123124125126127128129130131132133134135136137138139114 unmodified lines# 2️⃣ Upload Pagedef upload_page():with gr.Blocks() as upload_ui:gr.Markdown("### 📂 EEG Data Upload")with gr.Row():eeg_file = gr.File(label="EEG CSV File", file_types=[".csv"])video_file = gr.File(label="(Optional) Reference Video", file_types=[".mp4", ".mov", ".avi"])status = gr.Markdown("") # live status updates herenext_btn = gr.Button("Next ➡️", variant="primary")# Validation before moving forwarddef validate_files(eeg, video):if eeg is None:return "⚠️ Please upload at least an EEG CSV file before continuing."return "✅ Files ready! Proceed to analysis."next_btn.click(fn=validate_files, inputs=[eeg_file, video_file], outputs=status)return upload_ui, eeg_file, video_file, next_btn# 3️⃣ Analysis Pagedef analysis_page():
app.py+19-6