Spaces:
Sleeping
Sleeping
Commit
·
76c801a
1
Parent(s):
2797bac
update app theme
Browse files
app.py
CHANGED
|
@@ -1310,9 +1310,17 @@ def run_pruned_detection(
|
|
| 1310 |
original_result, pruned_result, size_orig, size_pruned, "Pruned Model", score_thresh
|
| 1311 |
)
|
| 1312 |
det_df = build_detection_comparison_df(original_result["detections"], pruned_result["detections"], "Pruned")
|
| 1313 |
-
|
| 1314 |
draw_detections(original_result["image"], original_result["detections"]),
|
|
|
|
|
|
|
|
|
|
| 1315 |
draw_detections(pruned_result["image"], pruned_result["detections"]),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1316 |
)
|
| 1317 |
|
| 1318 |
downloads: list[str] = []
|
|
@@ -1464,9 +1472,17 @@ def run_quantized_detection(
|
|
| 1464 |
original_result, quant_result, size_orig, size_quant, "Quantized Model", score_thresh
|
| 1465 |
)
|
| 1466 |
det_df = build_detection_comparison_df(original_result["detections"], quant_result["detections"], "Quantized")
|
| 1467 |
-
|
| 1468 |
draw_detections(original_result["image"], original_result["detections"]),
|
|
|
|
|
|
|
|
|
|
| 1469 |
draw_detections(quant_result["image"], quant_result["detections"]),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1470 |
)
|
| 1471 |
|
| 1472 |
downloads: list[str] = []
|
|
@@ -2340,7 +2356,7 @@ def main():
|
|
| 2340 |
return
|
| 2341 |
|
| 2342 |
demo = create_demo()
|
| 2343 |
-
demo.launch()
|
| 2344 |
|
| 2345 |
|
| 2346 |
if __name__ == "__main__":
|
|
|
|
| 1310 |
original_result, pruned_result, size_orig, size_pruned, "Pruned Model", score_thresh
|
| 1311 |
)
|
| 1312 |
det_df = build_detection_comparison_df(original_result["detections"], pruned_result["detections"], "Pruned")
|
| 1313 |
+
overlay_orig = add_image_label(
|
| 1314 |
draw_detections(original_result["image"], original_result["detections"]),
|
| 1315 |
+
"Original Model",
|
| 1316 |
+
)
|
| 1317 |
+
overlay_pruned = add_image_label(
|
| 1318 |
draw_detections(pruned_result["image"], pruned_result["detections"]),
|
| 1319 |
+
"Pruned Model",
|
| 1320 |
+
)
|
| 1321 |
+
overlay_slider_value = (
|
| 1322 |
+
overlay_orig,
|
| 1323 |
+
overlay_pruned,
|
| 1324 |
)
|
| 1325 |
|
| 1326 |
downloads: list[str] = []
|
|
|
|
| 1472 |
original_result, quant_result, size_orig, size_quant, "Quantized Model", score_thresh
|
| 1473 |
)
|
| 1474 |
det_df = build_detection_comparison_df(original_result["detections"], quant_result["detections"], "Quantized")
|
| 1475 |
+
overlay_orig = add_image_label(
|
| 1476 |
draw_detections(original_result["image"], original_result["detections"]),
|
| 1477 |
+
"Original Model",
|
| 1478 |
+
)
|
| 1479 |
+
overlay_quant = add_image_label(
|
| 1480 |
draw_detections(quant_result["image"], quant_result["detections"]),
|
| 1481 |
+
"Quantized Model",
|
| 1482 |
+
)
|
| 1483 |
+
overlay_slider_value = (
|
| 1484 |
+
overlay_orig,
|
| 1485 |
+
overlay_quant,
|
| 1486 |
)
|
| 1487 |
|
| 1488 |
downloads: list[str] = []
|
|
|
|
| 2356 |
return
|
| 2357 |
|
| 2358 |
demo = create_demo()
|
| 2359 |
+
demo.launch(theme = gr.themes.Soft())
|
| 2360 |
|
| 2361 |
|
| 2362 |
if __name__ == "__main__":
|