Krlos02 commited on
Commit
618ecdd
·
verified ·
1 Parent(s): 928942a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -4,7 +4,7 @@ from PIL import Image
4
  import keras
5
  import numpy as np
6
 
7
- from transformers import TFAutoModel
8
 
9
  backbone = TFAutoModel.from_pretrained("facebook/deit-tiny-patch16-224")
10
 
@@ -27,7 +27,7 @@ model = keras.models.load_model(
27
  labels = ['glioma', 'meningioma', 'notumor', 'pituitary']
28
 
29
  # Preprocesamiento (ajustado al modelo Deit-Tiny 224x224)
30
- IMG_SIZE = (224, 224)
31
 
32
  def predict(image):
33
 
 
4
  import keras
5
  import numpy as np
6
 
7
+ from transformers import TFAutoModel, AutoImageProcessor
8
 
9
  backbone = TFAutoModel.from_pretrained("facebook/deit-tiny-patch16-224")
10
 
 
27
  labels = ['glioma', 'meningioma', 'notumor', 'pituitary']
28
 
29
  # Preprocesamiento (ajustado al modelo Deit-Tiny 224x224)
30
+ processor = AutoImageProcessor.from_pretrained("facebook/deit-tiny-patch16-224")
31
 
32
  def predict(image):
33