Spaces:
Runtime error
Runtime error
Commit ·
8cd14af
1
Parent(s): eb7cee4
Update app.py
Browse files
app.py
CHANGED
|
@@ -50,9 +50,9 @@ def bk_fn(cur):
|
|
| 50 |
next = 0
|
| 51 |
return next
|
| 52 |
def tog_on():
|
| 53 |
-
return 1,gr.Markdown.update("""<
|
| 54 |
def tog_off():
|
| 55 |
-
return 0,gr.Markdown.update("""<
|
| 56 |
|
| 57 |
def pl_fn(cap,cur,last,fps,pl_tog):
|
| 58 |
player.set(cv2.CAP_PROP_POS_FRAMES, cur)
|
|
@@ -68,7 +68,7 @@ def pl_fn(cap,cur,last,fps,pl_tog):
|
|
| 68 |
|
| 69 |
with gr.Blocks() as app:
|
| 70 |
gr.Markdown("""<center><h1>Slow Video Object Detection</h1><h4>Gradio and ultralyticsplus/yolov8s</h4><h4>Probably faster on GPU 🤷♂️</h4></center>""")
|
| 71 |
-
play_state = gr.Markdown("""<right><h7>
|
| 72 |
|
| 73 |
with gr.Row():
|
| 74 |
with gr.Column():
|
|
|
|
| 50 |
next = 0
|
| 51 |
return next
|
| 52 |
def tog_on():
|
| 53 |
+
return 1,gr.Markdown.update("""<center><h7>Status: Playing 😴</h7></center>""")
|
| 54 |
def tog_off():
|
| 55 |
+
return 0,gr.Markdown.update("""<center><h7>Status: Stopped 💀</h7></center>""")
|
| 56 |
|
| 57 |
def pl_fn(cap,cur,last,fps,pl_tog):
|
| 58 |
player.set(cv2.CAP_PROP_POS_FRAMES, cur)
|
|
|
|
| 68 |
|
| 69 |
with gr.Blocks() as app:
|
| 70 |
gr.Markdown("""<center><h1>Slow Video Object Detection</h1><h4>Gradio and ultralyticsplus/yolov8s</h4><h4>Probably faster on GPU 🤷♂️</h4></center>""")
|
| 71 |
+
play_state = gr.Markdown("""<right><h7></h7></right>""")
|
| 72 |
|
| 73 |
with gr.Row():
|
| 74 |
with gr.Column():
|