Spaces:
Sleeping
Sleeping
Commit
·
23100d7
1
Parent(s):
c803c34
Update app.py
Browse files
app.py
CHANGED
@@ -25,13 +25,15 @@ def make_prediction(img, feature_extractor, model):
|
|
25 |
|
26 |
|
27 |
def detect_objects(experiment_type, attention_heads_num, image_input, threshold, display_mask=False, img_input_mask=None):
|
28 |
-
if experiment_type == "
|
29 |
model_repo = f"polejowska/detr-r50-cd45rb-all-2ah"
|
30 |
-
if experiment_type == "
|
|
|
|
|
31 |
model_repo = f"polejowska/detr-r50-cd45rb-all-4ah"
|
32 |
-
if experiment_type == "
|
33 |
model_repo = f"polejowska/detr-r50-cd45rb-all-8ah"
|
34 |
-
if experiment_type == "
|
35 |
model_repo = f"polejowska/detr-r50-cd45rb-all-16ah"
|
36 |
model = DetrForObjectDetection.from_pretrained(model_repo)
|
37 |
|
@@ -99,15 +101,15 @@ with gr.Blocks(css=css) as app:
|
|
99 |
with gr.Column():
|
100 |
with gr.Row():
|
101 |
experiment_type = gr.Dropdown(
|
102 |
-
value="
|
103 |
choices=[
|
104 |
-
"
|
105 |
-
"
|
106 |
-
"
|
107 |
-
"
|
108 |
-
|
109 |
],
|
110 |
-
label="Select an
|
111 |
show_label=True,
|
112 |
)
|
113 |
with gr.Row():
|
@@ -148,7 +150,6 @@ with gr.Blocks(css=css) as app:
|
|
148 |
choices=[
|
149 |
"ReLU",
|
150 |
"GeLU",
|
151 |
-
|
152 |
],
|
153 |
label="Select an activation function",
|
154 |
show_label=True,
|
@@ -166,7 +167,6 @@ with gr.Blocks(css=css) as app:
|
|
166 |
choices=[
|
167 |
"True",
|
168 |
"False",
|
169 |
-
|
170 |
],
|
171 |
label="Use dilation",
|
172 |
show_label=True,
|
|
|
25 |
|
26 |
|
27 |
def detect_objects(experiment_type, attention_heads_num, image_input, threshold, display_mask=False, img_input_mask=None):
|
28 |
+
if experiment_type == "Parameters verification":
|
29 |
model_repo = f"polejowska/detr-r50-cd45rb-all-2ah"
|
30 |
+
if experiment_type == "Reproducability check (1)":
|
31 |
+
model_repo = f"polejowska/detr-r50-cd45rb-all-2ah"
|
32 |
+
if experiment_type == "Reproducability check (2)":
|
33 |
model_repo = f"polejowska/detr-r50-cd45rb-all-4ah"
|
34 |
+
if experiment_type == "Reproducability check (3)":
|
35 |
model_repo = f"polejowska/detr-r50-cd45rb-all-8ah"
|
36 |
+
if experiment_type == "Reproducability check (4):
|
37 |
model_repo = f"polejowska/detr-r50-cd45rb-all-16ah"
|
38 |
model = DetrForObjectDetection.from_pretrained(model_repo)
|
39 |
|
|
|
101 |
with gr.Column():
|
102 |
with gr.Row():
|
103 |
experiment_type = gr.Dropdown(
|
104 |
+
value="Parameters verification",
|
105 |
choices=[
|
106 |
+
"Parameters verification",
|
107 |
+
"Reproducability check (1)",
|
108 |
+
"Reproducability check (2)",
|
109 |
+
"Reproducability check (3)",
|
110 |
+
"Reproducability check (3)",
|
111 |
],
|
112 |
+
label="Select an experiment type",
|
113 |
show_label=True,
|
114 |
)
|
115 |
with gr.Row():
|
|
|
150 |
choices=[
|
151 |
"ReLU",
|
152 |
"GeLU",
|
|
|
153 |
],
|
154 |
label="Select an activation function",
|
155 |
show_label=True,
|
|
|
167 |
choices=[
|
168 |
"True",
|
169 |
"False",
|
|
|
170 |
],
|
171 |
label="Use dilation",
|
172 |
show_label=True,
|