Spaces:
Build error
Build error
Update prediction.py
Browse files- prediction.py +4 -1
prediction.py
CHANGED
|
@@ -10,7 +10,10 @@ def run():
|
|
| 10 |
|
| 11 |
# File upload
|
| 12 |
uploaded_file = st.file_uploader("Select the rice image...", type=["jpg", "jpeg", "png"])
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
| 14 |
# Function to preprocess the uploaded image
|
| 15 |
def preprocess_image(image):
|
| 16 |
img = image.resize((img_height, img_width))
|
|
|
|
| 10 |
|
| 11 |
# File upload
|
| 12 |
uploaded_file = st.file_uploader("Select the rice image...", type=["jpg", "jpeg", "png"])
|
| 13 |
+
|
| 14 |
+
# Mendefinisikan dimensi gambar
|
| 15 |
+
img_height, img_width = 220, 220
|
| 16 |
+
|
| 17 |
# Function to preprocess the uploaded image
|
| 18 |
def preprocess_image(image):
|
| 19 |
img = image.resize((img_height, img_width))
|