File size: 835 Bytes
d022705 731299b d022705 5fdbc81 13f97c3 5fdbc81 13f97c3 731299b 13f97c3 d022705 13f97c3 5fdbc81 d022705 13f97c3 5fdbc81 d022705 5fdbc81 13f97c3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# Import libraries
import streamlit as st
import mne
import matplotlib.pyplot as plt
import os
import streamlit as st
import random
from misc import *
import streamlit as st
# Create two columns with st.columns (new way)
col1, col2 = st.columns(2)
# Create the upload button in the first column
# Load the edf file
edf_file = col1.file_uploader("Upload an EEG edf file", type="edf")
# Create the result placeholder button in the second column
col2.button('Result:')
if edf_file is not None:
# Read the file
raw = read_file(edf_file)
# Preprocess and plot the data
preprocessing_and_plotting(raw)
# Build the model
clf = build_model(model_name='deep4net', n_classes=2, n_chans=21, input_window_samples=6000)
output = predict(raw,clf)
# # Print the output
set_button_state (output,col2) |