Tshering12 commited on
Commit
517bb25
·
verified ·
1 Parent(s): 9b8bf58

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -3,7 +3,7 @@ from transformers import pipeline
3
  pipeline = pipeline(task="image-classification", model="julien-c/hotdog-not-hotdog")
4
 
5
  def predict(input_img):
6
- predictions = pipe(input_img)
7
  return input_img, {p["label"]: p["score"] for p in predictions}
8
 
9
  gradio_app = gr.Interface(
@@ -13,5 +13,5 @@ gradio_app = gr.Interface(
13
  title = "Hot Dog? Or Not?"
14
  )
15
 
16
- if __main__=="__main__":
17
  gradio_app.launch()
 
3
  pipeline = pipeline(task="image-classification", model="julien-c/hotdog-not-hotdog")
4
 
5
  def predict(input_img):
6
+ predictions = pipeline(input_img)
7
  return input_img, {p["label"]: p["score"] for p in predictions}
8
 
9
  gradio_app = gr.Interface(
 
13
  title = "Hot Dog? Or Not?"
14
  )
15
 
16
+ if _main_=="_main_":
17
  gradio_app.launch()