Spaces:
Runtime error
Runtime error
feat: ✨ title/subtitle/duplicate texts and badge added
Browse filesSigned-off-by: Onuralp SEZER <thunderbirdtr@fedoraproject.org>
app.py
CHANGED
|
@@ -14,6 +14,16 @@ else:
|
|
| 14 |
device = device("cpu")
|
| 15 |
|
| 16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
def load_model(img):
|
| 18 |
# Load model, get results and return detections/labels
|
| 19 |
model = YOLO("yolov8s-seg.pt")
|
|
@@ -153,7 +163,9 @@ purple_theme = theme = gr.themes.Soft(primary_hue=gr.themes.colors.purple).set(
|
|
| 153 |
)
|
| 154 |
|
| 155 |
with gr.Blocks(theme=purple_theme) as app:
|
| 156 |
-
gr.
|
|
|
|
|
|
|
| 157 |
annotators = gr.CheckboxGroup(
|
| 158 |
choices=[
|
| 159 |
"BoundingBox",
|
|
|
|
| 14 |
device = device("cpu")
|
| 15 |
|
| 16 |
|
| 17 |
+
TITLE = """<h1 align="center">Supervision Annotator Playground 🚀</h1>"""
|
| 18 |
+
SUBTITLE = """<h2 align="center">Experiment with Supervision Annotators</h2>"""
|
| 19 |
+
DUPLICATE = """
|
| 20 |
+
<div style="text-align: center; display: flex; justify-content: center; align-items: center;">
|
| 21 |
+
<a href="https://huggingface.co/spaces/Roboflow/Annotators?duplicate=true">
|
| 22 |
+
<img src="https://bit.ly/3gLdBN6" alt="Duplicate Space" style="margin-right: 10px;">
|
| 23 |
+
</a>
|
| 24 |
+
</div>
|
| 25 |
+
"""
|
| 26 |
+
|
| 27 |
def load_model(img):
|
| 28 |
# Load model, get results and return detections/labels
|
| 29 |
model = YOLO("yolov8s-seg.pt")
|
|
|
|
| 163 |
)
|
| 164 |
|
| 165 |
with gr.Blocks(theme=purple_theme) as app:
|
| 166 |
+
gr.HTML(TITLE)
|
| 167 |
+
gr.HTML(SUBTITLE)
|
| 168 |
+
gr.HTML(DUPLICATE)
|
| 169 |
annotators = gr.CheckboxGroup(
|
| 170 |
choices=[
|
| 171 |
"BoundingBox",
|