Antoine101 commited on
Commit
05ede16
·
verified ·
1 Parent(s): 75f6732

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -25,20 +25,21 @@ def plot_results(image, results, threshold=0.7):
25
  def predict(image):
26
  # make the object detection pipeline
27
  obj_detector = pipeline(
28
- "object-detection", model="Antoine101/detr-resnet-50-hardhat-finetuned"
29
  )
30
  results = obj_detector(image)
31
  return plot_results(image, results)
32
 
33
- title = "Do you have your helmet on?"
34
  description = """
35
- DETR model finetuned on "anindya64/hardhat" for hard hats detection.
36
  """
37
 
38
  demo = gr.Interface(
39
  fn=predict,
40
  inputs=gr.Image(label="Input Image", type="pil"),
41
  outputs="image",
 
42
  title=title,
43
  description=description
44
  )
 
25
  def predict(image):
26
  # make the object detection pipeline
27
  obj_detector = pipeline(
28
+ "object-detection", model="Antoine101/detr-resnet-50-fashionpedia-finetuned"
29
  )
30
  results = obj_detector(image)
31
  return plot_results(image, results)
32
 
33
+ title = "Are you fashion?"
34
  description = """
35
+ DETR model finetuned on "detection-datasets/fashionpedia" for apparels detection.
36
  """
37
 
38
  demo = gr.Interface(
39
  fn=predict,
40
  inputs=gr.Image(label="Input Image", type="pil"),
41
  outputs="image",
42
+ examples=[["examples/example1.jpg"], ["examples/example2.jpg"]],
43
  title=title,
44
  description=description
45
  )