Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,7 +13,7 @@ with open('class_labels.json', 'r') as f:
|
|
| 13 |
|
| 14 |
def preprocess_image(image):
|
| 15 |
# Gradio'dan gelen görüntüyü işle
|
| 16 |
-
image = cv2.resize(image, (
|
| 17 |
image = image.astype('float32') / 255.0 # Normalize et
|
| 18 |
return np.expand_dims(image, axis=0) # Batch boyutu ekle
|
| 19 |
|
|
|
|
| 13 |
|
| 14 |
def preprocess_image(image):
|
| 15 |
# Gradio'dan gelen görüntüyü işle
|
| 16 |
+
image = cv2.resize(image, (128,128)) # Model için kullandığımız boyuta getir
|
| 17 |
image = image.astype('float32') / 255.0 # Normalize et
|
| 18 |
return np.expand_dims(image, axis=0) # Batch boyutu ekle
|
| 19 |
|