Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -9,6 +9,7 @@ import io
|
|
9 |
app = Flask(__name__)
|
10 |
|
11 |
# Load the trained model
|
|
|
12 |
|
13 |
|
14 |
@app.route('/')
|
@@ -36,7 +37,7 @@ def detect_pothole(id):
|
|
36 |
print('Image data:', image)
|
37 |
|
38 |
# Make predictions
|
39 |
-
result =
|
40 |
|
41 |
# Convert the prediction to a label
|
42 |
if result[0][0] == 1:
|
|
|
9 |
app = Flask(__name__)
|
10 |
|
11 |
# Load the trained model
|
12 |
+
model = tf.keras.models.load_model('./save_model.h5',compile=False)
|
13 |
|
14 |
|
15 |
@app.route('/')
|
|
|
37 |
print('Image data:', image)
|
38 |
|
39 |
# Make predictions
|
40 |
+
result = model.predict(image)
|
41 |
|
42 |
# Convert the prediction to a label
|
43 |
if result[0][0] == 1:
|