Antoine101 commited on
Commit
fbf9586
·
verified ·
1 Parent(s): 37ebe20

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -9
app.py CHANGED
@@ -29,21 +29,13 @@ def predict(image):
29
  results = obj_detector(train_dataset[0]["image"])
30
  return plot_results(image)
31
 
32
-
33
-
34
- results = obj_detector(image)
35
- plot_results(image, results)
36
-
37
- def greet(name):
38
- return "Hello " + name + "!!"
39
-
40
  title = "Do you have your helmet on?"
41
  description = """
42
  DETR model finetuned on "anindya64/hardhat" for hard hats detection.
43
  """
44
 
45
  demo = gr.Interface(
46
- fn=greet,
47
  inputs=gr.Image(type="filepath", label="Input Image"),
48
  outputs="image",
49
  title=title,
 
29
  results = obj_detector(train_dataset[0]["image"])
30
  return plot_results(image)
31
 
 
 
 
 
 
 
 
 
32
  title = "Do you have your helmet on?"
33
  description = """
34
  DETR model finetuned on "anindya64/hardhat" for hard hats detection.
35
  """
36
 
37
  demo = gr.Interface(
38
+ fn=predict,
39
  inputs=gr.Image(type="filepath", label="Input Image"),
40
  outputs="image",
41
  title=title,