Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -225,65 +225,63 @@ with gr.Blocks() as demo:
|
|
225 |
with gr.Row():
|
226 |
|
227 |
with gr.Column(variant='panel'):
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
res_md = gr.Markdown("""
|
255 |
(Download this file if you plan to run the models using the <a href="">source code</a>.)
|
256 |
-
""",
|
|
|
257 |
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
|
265 |
-
with gr.Column():
|
266 |
-
|
|
|
|
|
|
|
267 |
with gr.Column():
|
268 |
-
gr.
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
run_btn = gr.Button(interactive=False)
|
283 |
-
# --------------------output---------------------
|
284 |
-
batch_md = gr.Markdown(visible=False)
|
285 |
-
out_data_file = gr.File(label="Denoised data", visible=False)
|
286 |
-
# -----------------------------------------------
|
287 |
|
288 |
with gr.Row():
|
289 |
with gr.Tab("README"):
|
|
|
225 |
with gr.Row():
|
226 |
|
227 |
with gr.Column(variant='panel'):
|
228 |
+
gr.Markdown("# 1.Channel Mapping")
|
229 |
+
# --------------------input----------------------
|
230 |
+
in_loc_file = gr.File(label="Channel locations (.loc, .locs, .xyz, .sfp, .txt)",
|
231 |
+
file_types=[".loc", "locs", ".xyz", ".sfp", ".txt"])
|
232 |
+
map_btn = gr.Button("Map")
|
233 |
+
# -------------------mapping---------------------
|
234 |
+
desc_md = gr.Markdown(visible=False)
|
235 |
+
# step1 : initial matching and scaling
|
236 |
+
with gr.Row():
|
237 |
+
tpl_img = gr.Image("./template_montage.png", label="Template montage", visible=False)
|
238 |
+
mapped_img = gr.Image(label="Matching results", visible=False)
|
239 |
+
# step2 : forward unmatched input channels to empty template channels
|
240 |
+
radio_group = gr.Radio(elem_id="radio-group", visible=False)
|
241 |
+
# step3 : fill the remaining template channels
|
242 |
+
with gr.Row():
|
243 |
+
in_fillmode = gr.Dropdown(choices=["mean", "zero"],
|
244 |
+
value="mean",
|
245 |
+
label="Filling method",
|
246 |
+
visible=False,
|
247 |
+
scale=2)
|
248 |
+
fillmode_btn = gr.Button("OK", visible=False, scale=1)
|
249 |
+
chkbox_group = gr.CheckboxGroup(elem_id="chkbox-group", visible=False)
|
250 |
+
# step4 : mapping results
|
251 |
+
out_json_file = gr.File(visible=False)
|
252 |
+
res_md = gr.Markdown(
|
253 |
+
"""
|
|
|
254 |
(Download this file if you plan to run the models using the <a href="">source code</a>.)
|
255 |
+
""",
|
256 |
+
visible=False)
|
257 |
|
258 |
+
with gr.Row():
|
259 |
+
clear_btn = gr.Button("Clear", visible=False)
|
260 |
+
step2_btn = gr.Button("Next", visible=False)
|
261 |
+
step3_btn = gr.Button("Next", visible=False)
|
262 |
+
next_btn = gr.Button("Next step", visible=False)
|
263 |
+
# -----------------------------------------------
|
264 |
|
265 |
+
with gr.Column(variant='panel'):
|
266 |
+
gr.Markdown("# 2.Decode Data")
|
267 |
+
# --------------------input----------------------
|
268 |
+
with gr.Row():
|
269 |
+
in_data_file = gr.File(label="Raw data (.csv)", file_types=[".csv"])
|
270 |
with gr.Column():
|
271 |
+
in_samplerate = gr.Textbox(label="Sampling rate (Hz)")
|
272 |
+
in_modelname = gr.Dropdown(choices=[
|
273 |
+
("ART", "EEGART"),
|
274 |
+
("IC-U-Net", "ICUNet"),
|
275 |
+
("IC-U-Net++", "UNetpp"),
|
276 |
+
("IC-U-Net-Attn", "AttUnet")],
|
277 |
+
#"(mapped data)"],
|
278 |
+
value="EEGART",
|
279 |
+
label="Model")
|
280 |
+
run_btn = gr.Button(interactive=False)
|
281 |
+
# --------------------output---------------------
|
282 |
+
batch_md = gr.Markdown(visible=False)
|
283 |
+
out_data_file = gr.File(label="Denoised data", visible=False)
|
284 |
+
# -----------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
285 |
|
286 |
with gr.Row():
|
287 |
with gr.Tab("README"):
|