ALVHB95 commited on
Commit
0706ead
·
verified ·
1 Parent(s): d6d0c8d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -36,10 +36,9 @@ from huggingface_hub import from_pretrained_keras
36
 
37
  # Cell 1: Image Classification Model
38
  model1 = from_pretrained_keras("rocioadlc/EfficientNetV2L")
39
- image_pipeline = pipeline(task="image-classification", model=model1)
40
 
41
  def predict_image(input_img):
42
- predictions = image_pipeline(input_img)
43
  return input_img, {p["label"]: p["score"] for p in predictions}
44
 
45
  image_gradio_app = gr.Interface(
 
36
 
37
  # Cell 1: Image Classification Model
38
  model1 = from_pretrained_keras("rocioadlc/EfficientNetV2L")
 
39
 
40
  def predict_image(input_img):
41
+ predictions = model1.predict(input_img)
42
  return input_img, {p["label"]: p["score"] for p in predictions}
43
 
44
  image_gradio_app = gr.Interface(