Kalbe-x-Bangkit
commited on
Commit
•
b437143
1
Parent(s):
f6fd1f6
Change input of detection from enhanced_image to enhancement_type.
Browse files
app.py
CHANGED
@@ -347,7 +347,7 @@ def redirect_button(url):
|
|
347 |
|
348 |
def predict(model, image):
|
349 |
""" Predict bounding box and label for the input image. """
|
350 |
-
pred_bbox, pred_class = model.predict(
|
351 |
pred_label_confidence = np.max(pred_class, axis=1)[0]
|
352 |
pred_label = np.argmax(pred_class, axis=1)[0]
|
353 |
return pred_bbox[0], pred_label, pred_label_confidence
|
@@ -461,7 +461,7 @@ if uploaded_file is not None:
|
|
461 |
if st.button('Auto Detect'):
|
462 |
st.write("Processing...")
|
463 |
# input_image = preprocess_image(image)
|
464 |
-
input_image =
|
465 |
pred_bbox, pred_label, pred_label_confidence = predict(model, input_image)
|
466 |
|
467 |
# Updated label mapping based on the dataset
|
|
|
347 |
|
348 |
def predict(model, image):
|
349 |
""" Predict bounding box and label for the input image. """
|
350 |
+
pred_bbox, pred_class = model.predict(enhancement_type)
|
351 |
pred_label_confidence = np.max(pred_class, axis=1)[0]
|
352 |
pred_label = np.argmax(pred_class, axis=1)[0]
|
353 |
return pred_bbox[0], pred_label, pred_label_confidence
|
|
|
461 |
if st.button('Auto Detect'):
|
462 |
st.write("Processing...")
|
463 |
# input_image = preprocess_image(image)
|
464 |
+
input_image = enhancement_type
|
465 |
pred_bbox, pred_label, pred_label_confidence = predict(model, input_image)
|
466 |
|
467 |
# Updated label mapping based on the dataset
|