Spaces:
Runtime error
Runtime error
sshi
commited on
Commit
·
60390c6
1
Parent(s):
cbbced1
Add emoji in the description.
Browse files
app.py
CHANGED
|
@@ -139,15 +139,11 @@ def visualize_preds(image, preds, threshold=0.9):
|
|
| 139 |
def detect(img):
|
| 140 |
# Run inference
|
| 141 |
preds = generate_preds(feature_extractor, model_yolos, img)
|
| 142 |
-
return visualize_preds(img, preds)
|
| 143 |
|
| 144 |
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
description = "this is a traffic object detector based on <a href='https://huggingface.co/docs/transformers/model_doc/yolos' style='text-decoration: underline' target='_blank'>YOLOS</a>. \n\n" + \
|
| 150 |
-
"The model can detect following targets: 1 person, 2 rider, 3 car, 4 bus, 5 truck, 6 bike, 7 motor, 8 traffic light, 9 traffic sign, 10 train."
|
| 151 |
|
| 152 |
|
| 153 |
interface = gr.Interface(
|
|
|
|
| 139 |
def detect(img):
|
| 140 |
# Run inference
|
| 141 |
preds = generate_preds(feature_extractor, model_yolos, img)
|
| 142 |
+
return visualize_preds(img, preds)
|
| 143 |
|
| 144 |
|
| 145 |
+
description = "Welcome to this space! 🤗this is a traffic object detector based on <a href='https://huggingface.co/docs/transformers/model_doc/yolos' style='text-decoration: underline' target='_blank'>YOLOS</a>. \n\n" + \
|
| 146 |
+
"The model can detect following targets: person🚶♂️, rider🚴♀️, car🚗, bus🚌, truck🚚, bike🚲, motor🏍️, traffic light🚦, traffic sign⛔, train🚄."
|
|
|
|
|
|
|
|
|
|
|
|
|
| 147 |
|
| 148 |
|
| 149 |
interface = gr.Interface(
|