PiyushGPT commited on
Commit
bc7fe11
·
verified ·
1 Parent(s): 026dc95

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -12
app.py CHANGED
@@ -62,17 +62,6 @@ def draw_boxes(image, results, queries):
62
 
63
  # Prediction Function
64
  def detect_objects(image, text_query, threshold):
65
- """
66
- Detect objects in image based on text query.
67
-
68
- Args:
69
- image: PIL Image or numpy array
70
- text_query: Comma-separated text queries (e.g., "dog, cat, person")
71
- threshold: Detection confidence threshold
72
-
73
- Returns:
74
- Annotated image with bounding boxes
75
- """
76
  global model, processor
77
 
78
  if image is None:
@@ -127,7 +116,6 @@ def detect_objects(image, text_query, threshold):
127
  with gr.Blocks(title="Query based object detection") as demo:
128
  gr.Markdown(
129
  """
130
- # 🦉 OwlViT Object Detection
131
 
132
  Upload an image and describe what you want to detect. You can specify multiple objects separated by commas.
133
 
 
62
 
63
  # Prediction Function
64
  def detect_objects(image, text_query, threshold):
 
 
 
 
 
 
 
 
 
 
 
65
  global model, processor
66
 
67
  if image is None:
 
116
  with gr.Blocks(title="Query based object detection") as demo:
117
  gr.Markdown(
118
  """
 
119
 
120
  Upload an image and describe what you want to detect. You can specify multiple objects separated by commas.
121