kedimestan commited on
Commit
7b13da7
·
verified ·
1 Parent(s): 8049f05

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -3,13 +3,13 @@ from transformers import pipeline
3
  from PIL import Image
4
 
5
  # Swin modelini pipeline ile yükle
6
- model_name = "kedimestan/swin-base-patch4-window7-224"
7
  classifier = pipeline("image-classification", model=model_name)
8
 
9
  # Tahmin fonksiyonu
10
  def predict(image: Image.Image):
11
  # Görüntüyü sınıflandırma yaparak tahmin edin
12
- image = image.resize((224, 224))
13
  result = classifier(image)
14
  return result[0]["label"]
15
 
 
3
  from PIL import Image
4
 
5
  # Swin modelini pipeline ile yükle
6
+ model_name = "kedimestan/mobilevit-x-small"
7
  classifier = pipeline("image-classification", model=model_name)
8
 
9
  # Tahmin fonksiyonu
10
  def predict(image: Image.Image):
11
  # Görüntüyü sınıflandırma yaparak tahmin edin
12
+ image = image.resize((250, 250))
13
  result = classifier(image)
14
  return result[0]["label"]
15