Update app.py
Browse files
    	
        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/ | 
| 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(( | 
| 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 |  |