Spaces:
Runtime error
Runtime error
Commit
·
0895376
1
Parent(s):
85c68e5
Update app.py
Browse files
app.py
CHANGED
@@ -2,18 +2,17 @@ import gradio as gr
|
|
2 |
from utils.predict import predict, predict_batch
|
3 |
import os
|
4 |
import glob
|
5 |
-
inputs_list = []
|
6 |
|
7 |
-
|
8 |
-
demo = gr.Blocks()
|
9 |
example_list = glob.glob("examples/set2/*")
|
10 |
example_list = list(map(lambda el:[el], example_list))
|
11 |
-
sample_image = gr.Image(type='filepath')
|
12 |
examples = gr.components.Dataset(components=[sample_image], samples=example_list, type='values')
|
13 |
|
14 |
def load_example(image):
|
15 |
return image[0]
|
16 |
-
|
|
|
|
|
17 |
with demo:
|
18 |
|
19 |
gr.Markdown("# **<p align='center'>ShiftViT: A Vision Transformer without Attention</p>**")
|
|
|
2 |
from utils.predict import predict, predict_batch
|
3 |
import os
|
4 |
import glob
|
|
|
5 |
|
6 |
+
##Create Dataset for loading examples
|
|
|
7 |
example_list = glob.glob("examples/set2/*")
|
8 |
example_list = list(map(lambda el:[el], example_list))
|
|
|
9 |
examples = gr.components.Dataset(components=[sample_image], samples=example_list, type='values')
|
10 |
|
11 |
def load_example(image):
|
12 |
return image[0]
|
13 |
+
|
14 |
+
demo = gr.Blocks()
|
15 |
+
|
16 |
with demo:
|
17 |
|
18 |
gr.Markdown("# **<p align='center'>ShiftViT: A Vision Transformer without Attention</p>**")
|