Spaces:
Running
Running
Commit
·
d44f6a3
1
Parent(s):
1203db2
Refactor inference function in app.py to accept image directly instead of file path, simplifying the input process.
Browse files
app.py
CHANGED
@@ -53,9 +53,8 @@ model.hor_conf_thresh = 0.1
|
|
53 |
|
54 |
|
55 |
# @spaces.GPU
|
56 |
-
def inference(
|
57 |
"""Run inference on image and return annotated image."""
|
58 |
-
image = imread(image_fp)
|
59 |
results = model(image)
|
60 |
return results.draw(image)
|
61 |
|
|
|
53 |
|
54 |
|
55 |
# @spaces.GPU
|
56 |
+
def inference(image):
|
57 |
"""Run inference on image and return annotated image."""
|
|
|
58 |
results = model(image)
|
59 |
return results.draw(image)
|
60 |
|