gatesla commited on
Commit
510b4f7
·
verified ·
1 Parent(s): b444b25

Changed variable names

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -31,8 +31,8 @@ def detect_objects(model_name,url_input,image_input,threshold):
31
  processor = MaskFormerImageProcessor.from_pretrained(model_name)
32
  model = MaskFormerForInstanceSegmentation.from_pretrained(model_name)
33
 
34
- target_size = (img.shape[0], img.shape[1])
35
- inputs = preprocessor(images=img, return_tensors="pt")
36
  with torch.no_grad():
37
  outputs = model(**inputs)
38
  outputs.class_queries_logits = outputs.class_queries_logits.cpu()
@@ -125,7 +125,7 @@ def set_example_url(example: list) -> dict:
125
  return gr.Textbox.update(value=example[0])
126
 
127
 
128
- title = """<h1 id="title">Object Detection App with DETR and YOLOS</h1>"""
129
 
130
  description = """
131
  Links to HuggingFace Models:
 
31
  processor = MaskFormerImageProcessor.from_pretrained(model_name)
32
  model = MaskFormerForInstanceSegmentation.from_pretrained(model_name)
33
 
34
+ target_size = (image.shape[0], image.shape[1])
35
+ inputs = preprocessor(images=image, return_tensors="pt")
36
  with torch.no_grad():
37
  outputs = model(**inputs)
38
  outputs.class_queries_logits = outputs.class_queries_logits.cpu()
 
125
  return gr.Textbox.update(value=example[0])
126
 
127
 
128
+ title = """<h1 id="title">Image Segmentation with Various Models</h1>"""
129
 
130
  description = """
131
  Links to HuggingFace Models: