obichimav commited on
Commit
9b71c84
·
verified ·
1 Parent(s): 8f4d19f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -79,9 +79,11 @@ def format_query_for_model(text_input, model_type="owlv2"):
79
  if w not in ['count', 'detect', 'show', 'me', 'the', 'and', 'a', 'an']]
80
 
81
  if model_type == "owlv2":
 
82
  return [["a photo of " + obj for obj in words]]
83
  else: # DINO
84
  # DINO only works with single object queries with format "a object."
 
85
  return f"a {words[0]}."
86
 
87
  def detect_objects(query_text):
 
79
  if w not in ['count', 'detect', 'show', 'me', 'the', 'and', 'a', 'an']]
80
 
81
  if model_type == "owlv2":
82
+ print([["a photo of " + obj for obj in words]])
83
  return [["a photo of " + obj for obj in words]]
84
  else: # DINO
85
  # DINO only works with single object queries with format "a object."
86
+ print(f"a {words[0]}.")
87
  return f"a {words[0]}."
88
 
89
  def detect_objects(query_text):