Update app.py
Browse files
app.py
CHANGED
@@ -34,6 +34,9 @@ model = load_model()
|
|
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
|
|
|
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 |
+
# Definisikan max_length (misalnya panjang label maksimal)
|
38 |
+
max_length = 50 # Ganti sesuai dengan panjang label teks maksimal yang diinginkan
|
39 |
+
|
40 |
# Function to preprocess the image
|
41 |
def prepare_image(img):
|
42 |
img = img.resize((img_width, img_height)) # Resize to the expected input size for the model
|