Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -240,7 +240,7 @@ if st.session_state.screen == 2:
|
|
| 240 |
|
| 241 |
# show character locations
|
| 242 |
class_names = {0: "Waldo", 1: "Wenda", 2: "Odlaw", 3: "Wizard", 4: "Woof"}
|
| 243 |
-
for idx, pred in enumerate(results):
|
| 244 |
#extract detected character names and their confidence scores
|
| 245 |
st.session_state.detected_characters = {}
|
| 246 |
for *_, cls_id, conf in pred:
|
|
@@ -252,7 +252,7 @@ if st.session_state.screen == 2:
|
|
| 252 |
# display locations
|
| 253 |
st.session_state.locations = ""
|
| 254 |
for name, idx in st.session_state.detected_characters.items():
|
| 255 |
-
st.session_state.locations += f" {name}
|
| 256 |
st.write(st.session_state.locations)
|
| 257 |
|
| 258 |
# plot predicted image
|
|
|
|
| 240 |
|
| 241 |
# show character locations
|
| 242 |
class_names = {0: "Waldo", 1: "Wenda", 2: "Odlaw", 3: "Wizard", 4: "Woof"}
|
| 243 |
+
for idx, pred in enumerate(st.session_state.results):
|
| 244 |
#extract detected character names and their confidence scores
|
| 245 |
st.session_state.detected_characters = {}
|
| 246 |
for *_, cls_id, conf in pred:
|
|
|
|
| 252 |
# display locations
|
| 253 |
st.session_state.locations = ""
|
| 254 |
for name, idx in st.session_state.detected_characters.items():
|
| 255 |
+
st.session_state.locations += f" {name} tiles: {str(idx)}, )"
|
| 256 |
st.write(st.session_state.locations)
|
| 257 |
|
| 258 |
# plot predicted image
|