reab5555 commited on
Commit
ce3b441
·
verified ·
1 Parent(s): cc209a2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -1,4 +1,5 @@
1
  import gradio as gr
 
2
  import cv2
3
  from PIL import Image, ImageDraw, ImageFont
4
  import torch
@@ -129,6 +130,7 @@ def load_sample_frame(video_path):
129
  frame_rgb = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
130
  return frame_rgb
131
 
 
132
  def gradio_app():
133
  with gr.Blocks() as app:
134
  gr.Markdown("# Video Object Detection with Owlv2")
 
1
  import gradio as gr
2
+ from gradio import spaces
3
  import cv2
4
  from PIL import Image, ImageDraw, ImageFont
5
  import torch
 
130
  frame_rgb = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
131
  return frame_rgb
132
 
133
+ @spaces.GPU(duration=120)
134
  def gradio_app():
135
  with gr.Blocks() as app:
136
  gr.Markdown("# Video Object Detection with Owlv2")