not-lain commited on
Commit
b519821
1 Parent(s): 56dcf09

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -7,13 +7,13 @@ def predict(input_img):
7
  predictions = pipeline(input_img , threshold=0.5, #optional parameter defaults to 0
8
  return_scores = False #optional parameter defaults to False
9
  )
10
- return input_img, {p["label"]: p["score"] for p in predictions}
11
 
12
  gradio_app = gr.Interface(
13
  predict,
14
- inputs=gr.Image(label="Select hot dog candidate", sources=['upload', 'webcam'], type="pil"),
15
- outputs=[gr.Image(label="Processed Image"), gr.Label(label="Result", num_top_classes=2)],
16
- title="Hot Dog? Or Not?",
17
  )
18
 
19
  if __name__ == "__main__":
 
7
  predictions = pipeline(input_img , threshold=0.5, #optional parameter defaults to 0
8
  return_scores = False #optional parameter defaults to False
9
  )
10
+ return predictions
11
 
12
  gradio_app = gr.Interface(
13
  predict,
14
+ inputs=gr.Image(label="add your image here", sources=['upload', 'webcam'], type="pil"),
15
+ outputs=gr.Text(),
16
+ title="Image Annotator",
17
  )
18
 
19
  if __name__ == "__main__":