Changed som st.subheaders to st.metrics so extracted data could be dusplayed
Browse files
components/display_structured_data.py
CHANGED
|
@@ -9,13 +9,13 @@ def render_card_data(result: dict):
|
|
| 9 |
|
| 10 |
# Column one filled with name and HP
|
| 11 |
with col1:
|
| 12 |
-
st.
|
| 13 |
-
st.
|
| 14 |
|
| 15 |
# Column two filled with Pokemon types
|
| 16 |
with col2:
|
| 17 |
types = result.get("types")
|
| 18 |
-
st.
|
| 19 |
|
| 20 |
# Display moves below above columns
|
| 21 |
moves = result.get("moves")
|
|
|
|
| 9 |
|
| 10 |
# Column one filled with name and HP
|
| 11 |
with col1:
|
| 12 |
+
st.metric("Name", result.get("name") or "Not detected")
|
| 13 |
+
st.metric("HP", result.get("hp") or "Not detected")
|
| 14 |
|
| 15 |
# Column two filled with Pokemon types
|
| 16 |
with col2:
|
| 17 |
types = result.get("types")
|
| 18 |
+
st.metric("Types", ", ".join(types) if types else "Not detected")
|
| 19 |
|
| 20 |
# Display moves below above columns
|
| 21 |
moves = result.get("moves")
|