Spaces:
Runtime error
Runtime error
Added examples
Browse files
app.py
CHANGED
|
@@ -34,6 +34,13 @@ def process(array_binary, th, option):
|
|
| 34 |
def clear():
|
| 35 |
return None, None, None
|
| 36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
block = gr.Blocks(title="FcgFormer APP - Ohlabs")
|
| 39 |
with block:
|
|
@@ -54,6 +61,16 @@ with block:
|
|
| 54 |
run_button = gr.Button(value="Run", variant="primary")
|
| 55 |
with gr.Column():
|
| 56 |
clear_button = gr.Button(value="Clear")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
|
| 58 |
with gr.Column():
|
| 59 |
with gr.Tab("Prediction"):
|
|
|
|
| 34 |
def clear():
|
| 35 |
return None, None, None
|
| 36 |
|
| 37 |
+
examples_signal = [
|
| 38 |
+
['examples/2373797.npy'],
|
| 39 |
+
['examples/2459054.npy'],
|
| 40 |
+
['examples/17451182.npy'],
|
| 41 |
+
['examples/19013106.npy'],
|
| 42 |
+
['examples/168833805.npy'],
|
| 43 |
+
]
|
| 44 |
|
| 45 |
block = gr.Blocks(title="FcgFormer APP - Ohlabs")
|
| 46 |
with block:
|
|
|
|
| 61 |
run_button = gr.Button(value="Run", variant="primary")
|
| 62 |
with gr.Column():
|
| 63 |
clear_button = gr.Button(value="Clear")
|
| 64 |
+
|
| 65 |
+
with gr.Row():
|
| 66 |
+
download_example = gr.File(file_count="multiple",
|
| 67 |
+
label="Please select an example file below and then click on the file size, "
|
| 68 |
+
"which is typically highlighted in blue, to download the example signal "
|
| 69 |
+
"for testing purposes.",
|
| 70 |
+
type="binary", file_types=['.npy'])
|
| 71 |
+
with gr.Row():
|
| 72 |
+
gr.Examples(examples=examples_signal,
|
| 73 |
+
inputs=download_example, label="Download example file")
|
| 74 |
|
| 75 |
with gr.Column():
|
| 76 |
with gr.Tab("Prediction"):
|