cwpkd commited on
Commit
ccc2169
·
verified ·
1 Parent(s): 8f23224

สร้าง app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,11 +1,11 @@
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
- pipeline = pipeline(task="image-classification"),model="julien-c/hotdog-not-hotdog"
5
 
6
  def predict(input_img):
7
  predictions = pipeline(input_img)
8
- return input_img, {p["label"]: p["score"] for p in predictions}
9
 
10
  gradio_app = gr.Interface(
11
  predict,
 
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
+ pipeline = pipeline(task="image-classification", model="julien-c/hotdog-not-hotdog")
5
 
6
  def predict(input_img):
7
  predictions = pipeline(input_img)
8
+ return input_img, {p["label"]: p["score"] for p in predictions}
9
 
10
  gradio_app = gr.Interface(
11
  predict,