Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
import gradio as gr
|
2 |
import spaces
|
|
|
3 |
|
4 |
@spaces.GPU
|
5 |
def yolov9_inference(img_path, model_path,image_size, conf_threshold, iou_threshold):
|
@@ -33,8 +34,11 @@ def yolov9_inference(img_path, model_path,image_size, conf_threshold, iou_thresh
|
|
33 |
print("save_path:",save_path)
|
34 |
print("img_path:",img_path)
|
35 |
|
36 |
-
|
|
|
|
|
37 |
print(f"Output image saved to {output_path}")
|
|
|
38 |
return output_path
|
39 |
|
40 |
|
|
|
1 |
import gradio as gr
|
2 |
import spaces
|
3 |
+
import os
|
4 |
|
5 |
@spaces.GPU
|
6 |
def yolov9_inference(img_path, model_path,image_size, conf_threshold, iou_threshold):
|
|
|
34 |
print("save_path:",save_path)
|
35 |
print("img_path:",img_path)
|
36 |
|
37 |
+
new_image_path = os.path.basename(img_path)
|
38 |
+
output_path = save_path + new_image_path
|
39 |
+
|
40 |
print(f"Output image saved to {output_path}")
|
41 |
+
|
42 |
return output_path
|
43 |
|
44 |
|