Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -40,7 +40,7 @@ models = {'baseline': base_model ,
|
|
40 |
'performance': performance_model ,
|
41 |
'latence': optimized_model}
|
42 |
|
43 |
-
|
44 |
'performance': performance_processor ,
|
45 |
'latence': optimized_processor}
|
46 |
|
@@ -56,7 +56,7 @@ def process_image(image , mode = 'baseline' ):
|
|
56 |
image : a machine readable image of class PIL or numpy"""
|
57 |
|
58 |
model = models[mode]
|
59 |
-
processor =
|
60 |
d_type = torch.float32
|
61 |
|
62 |
model.to(device)
|
|
|
40 |
'performance': performance_model ,
|
41 |
'latence': optimized_model}
|
42 |
|
43 |
+
processors = {'baseline': base_processor ,
|
44 |
'performance': performance_processor ,
|
45 |
'latence': optimized_processor}
|
46 |
|
|
|
56 |
image : a machine readable image of class PIL or numpy"""
|
57 |
|
58 |
model = models[mode]
|
59 |
+
processor = processors[mode]
|
60 |
d_type = torch.float32
|
61 |
|
62 |
model.to(device)
|