Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -26,16 +26,6 @@ CLASS_LABELS = {
|
|
26 |
}
|
27 |
|
28 |
def predict_image(image):
|
29 |
-
"""
|
30 |
-
Predict the class of a given image.
|
31 |
-
|
32 |
-
Args:
|
33 |
-
image (PIL.Image.Image): Input image.
|
34 |
-
|
35 |
-
Returns:
|
36 |
-
str: Predicted class description.
|
37 |
-
float: Confidence score of the prediction.
|
38 |
-
"""
|
39 |
# Preprocess the image
|
40 |
img_array = img_to_array(image)
|
41 |
img_array = np.expand_dims(img_array, axis=0) # Add batch dimension
|
@@ -50,7 +40,7 @@ def predict_image(image):
|
|
50 |
|
51 |
# Streamlit app
|
52 |
st.title("Driver Distraction Detection")
|
53 |
-
st.markdown("Team18 Image Project : Sayandip Bhattacharyya, Purnendu Rudrapal, Sridatta Das,
|
54 |
|
55 |
# File upload
|
56 |
uploaded_file = st.file_uploader("Choose an image file", type=["jpg", "jpeg", "png"])
|
|
|
26 |
}
|
27 |
|
28 |
def predict_image(image):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
# Preprocess the image
|
30 |
img_array = img_to_array(image)
|
31 |
img_array = np.expand_dims(img_array, axis=0) # Add batch dimension
|
|
|
40 |
|
41 |
# Streamlit app
|
42 |
st.title("Driver Distraction Detection")
|
43 |
+
st.markdown("Team18 Image Project : Sayandip Bhattacharyya, Purnendu Rudrapal, Sridatta Das, Sidhartha Karjee")
|
44 |
|
45 |
# File upload
|
46 |
uploaded_file = st.file_uploader("Choose an image file", type=["jpg", "jpeg", "png"])
|