Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -94,6 +94,8 @@ with col2:
|
|
| 94 |
with col3:
|
| 95 |
st.header('details')
|
| 96 |
if gibsOk:
|
|
|
|
|
|
|
| 97 |
detectorForContents = pipeline("object-detection", model="sergioska/yolo-finetuned-flyers-content")
|
| 98 |
imageForDetails = Image.open(imagesForOpen[clicked])
|
| 99 |
outputImageForDetails = np.array(imageForDetails)
|
|
@@ -111,7 +113,7 @@ with col3:
|
|
| 111 |
drawForDetails.rectangle((xmin, ymin, xmax, ymax), outline="red", width=5)
|
| 112 |
drawForDetails.text((xmin, ymin), f"{label}: {round(score,5)}", fill="white")
|
| 113 |
|
| 114 |
-
st.image(
|
| 115 |
st.write(predictionsForDetails)
|
| 116 |
|
| 117 |
|
|
|
|
| 94 |
with col3:
|
| 95 |
st.header('details')
|
| 96 |
if gibsOk:
|
| 97 |
+
if clicked == -1:
|
| 98 |
+
clicked = 0
|
| 99 |
detectorForContents = pipeline("object-detection", model="sergioska/yolo-finetuned-flyers-content")
|
| 100 |
imageForDetails = Image.open(imagesForOpen[clicked])
|
| 101 |
outputImageForDetails = np.array(imageForDetails)
|
|
|
|
| 113 |
drawForDetails.rectangle((xmin, ymin, xmax, ymax), outline="red", width=5)
|
| 114 |
drawForDetails.text((xmin, ymin), f"{label}: {round(score,5)}", fill="white")
|
| 115 |
|
| 116 |
+
st.image(outputImageForDetails)
|
| 117 |
st.write(predictionsForDetails)
|
| 118 |
|
| 119 |
|