Spaces:
Runtime error
Runtime error
Commit ·
7ade6df
1
Parent(s): 8247d11
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,15 +15,7 @@ model_path_1 = hf_hub_download("Axpo/yolov8x-without-insulators", "yolov8x-witho
|
|
| 15 |
model_path_2 = hf_hub_download("Axpo/yolov8x-with-insulators", "yolov8x-with-insulators.pt", use_auth_token=os.environ["TOKEN"])
|
| 16 |
model_paths = [model_path_1, model_path_2]
|
| 17 |
|
| 18 |
-
|
| 19 |
-
"concrete-pole-close2.jpeg",
|
| 20 |
-
"steel-pole-close.jpg",
|
| 21 |
-
"steel-pole-insulators.jpeg",
|
| 22 |
-
"steel-pole-overview.jpeg",
|
| 23 |
-
"steel-pole-topdown.jpeg"]
|
| 24 |
-
|
| 25 |
-
img_paths = [hf_hub_download("Axpo/example_pole_images", img_name, repo_type="dataset", use_auth_token=os.environ["TOKEN"])
|
| 26 |
-
for img_name in image_names]
|
| 27 |
|
| 28 |
def draw_bboxes_yolo(
|
| 29 |
image: torch.Tensor,
|
|
@@ -123,7 +115,7 @@ with gr.Blocks() as demo:
|
|
| 123 |
)
|
| 124 |
|
| 125 |
gr.Examples(
|
| 126 |
-
|
| 127 |
input_img,
|
| 128 |
output_img,
|
| 129 |
predict_big_components
|
|
|
|
| 15 |
model_path_2 = hf_hub_download("Axpo/yolov8x-with-insulators", "yolov8x-with-insulators.pt", use_auth_token=os.environ["TOKEN"])
|
| 16 |
model_paths = [model_path_1, model_path_2]
|
| 17 |
|
| 18 |
+
dataset = load_dataset("Axpo/example_pole_images", use_auth_token=os.environ["TOKEN"])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
def draw_bboxes_yolo(
|
| 21 |
image: torch.Tensor,
|
|
|
|
| 115 |
)
|
| 116 |
|
| 117 |
gr.Examples(
|
| 118 |
+
dataset["train"]["image"],
|
| 119 |
input_img,
|
| 120 |
output_img,
|
| 121 |
predict_big_components
|