Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -35,7 +35,7 @@ if uploaded_file is not None:
|
|
| 35 |
# Convert uploaded file to a format compatible with OpenCV
|
| 36 |
img = Image.open(uploaded_file)
|
| 37 |
img_array = np.array(img.convert("RGB")) # Convert to RGB if needed
|
| 38 |
-
st.image(img, caption="Uploaded Image",
|
| 39 |
|
| 40 |
# Initialize ALPR with selected models
|
| 41 |
alpr = ALPR(detector_model=detector_model, ocr_model=ocr_model)
|
|
@@ -49,7 +49,7 @@ if uploaded_file is not None:
|
|
| 49 |
|
| 50 |
# Convert the annotated image back to display in Streamlit
|
| 51 |
annotated_img = Image.fromarray(annotated_img_array)
|
| 52 |
-
st.image(annotated_img, caption="Annotated Image with OCR Results",
|
| 53 |
|
| 54 |
# Display OCR results in text format for more detail
|
| 55 |
if results:
|
|
|
|
| 35 |
# Convert uploaded file to a format compatible with OpenCV
|
| 36 |
img = Image.open(uploaded_file)
|
| 37 |
img_array = np.array(img.convert("RGB")) # Convert to RGB if needed
|
| 38 |
+
st.image(img, caption="Uploaded Image", use_container_width=True)
|
| 39 |
|
| 40 |
# Initialize ALPR with selected models
|
| 41 |
alpr = ALPR(detector_model=detector_model, ocr_model=ocr_model)
|
|
|
|
| 49 |
|
| 50 |
# Convert the annotated image back to display in Streamlit
|
| 51 |
annotated_img = Image.fromarray(annotated_img_array)
|
| 52 |
+
st.image(annotated_img, caption="Annotated Image with OCR Results", use_container_width=True)
|
| 53 |
|
| 54 |
# Display OCR results in text format for more detail
|
| 55 |
if results:
|