Update app.py
Browse files
app.py
CHANGED
@@ -30,6 +30,10 @@ def load_model():
|
|
30 |
|
31 |
model = load_model()
|
32 |
|
|
|
|
|
|
|
|
|
33 |
# Function to preprocess the image
|
34 |
def prepare_image(img):
|
35 |
img = img.resize((img_width, img_height)) # Resize to the expected input size for the model
|
|
|
30 |
|
31 |
model = load_model()
|
32 |
|
33 |
+
|
34 |
+
# Menambahkan definisi img_width dan img_height
|
35 |
+
img_width, img_height = 200, 50 # Ganti sesuai dimensi input gambar yang digunakan oleh model Anda
|
36 |
+
|
37 |
# Function to preprocess the image
|
38 |
def prepare_image(img):
|
39 |
img = img.resize((img_width, img_height)) # Resize to the expected input size for the model
|