Spaces:
Runtime error
Runtime error
michaelwja
commited on
Commit
•
6fbdfd8
1
Parent(s):
4ec6290
Update app.py
Browse files
app.py
CHANGED
@@ -25,8 +25,7 @@ def yolov7_inference(
|
|
25 |
Returns:
|
26 |
Rendered image
|
27 |
"""
|
28 |
-
|
29 |
-
model = torch.hub.load('kadirnar/yolov7-v0.1', 'custom', path='skin_burn.pt', source='local', hf_model=True, device="cpu")
|
30 |
model.conf = conf_threshold
|
31 |
model.iou = iou_threshold
|
32 |
results = model([image], size=image_size)
|
@@ -37,7 +36,7 @@ inputs = [
|
|
37 |
gr.inputs.Image(type="pil", label="Input Image"),
|
38 |
gr.inputs.Dropdown(
|
39 |
choices=[
|
40 |
-
"skin_burn",
|
41 |
"Other"
|
42 |
],
|
43 |
default="skin_burn",
|
|
|
25 |
Returns:
|
26 |
Rendered image
|
27 |
"""
|
28 |
+
model = yolov7.load(model_path, device="cpu", hf_model=True, trace=False)
|
|
|
29 |
model.conf = conf_threshold
|
30 |
model.iou = iou_threshold
|
31 |
results = model([image], size=image_size)
|
|
|
36 |
gr.inputs.Image(type="pil", label="Input Image"),
|
37 |
gr.inputs.Dropdown(
|
38 |
choices=[
|
39 |
+
"skin_burn.pt",
|
40 |
"Other"
|
41 |
],
|
42 |
default="skin_burn",
|