Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -48,8 +48,13 @@ def display_image(url, scale=0.5):
|
|
48 |
st.image(image.resize(( int(image.width * scale), int(image.height * scale))))
|
49 |
|
50 |
def display_heroes_from_df(df):
|
51 |
-
display_cols = ['name', 'color', 'star', 'class', 'speed', 'power', 'attack', 'defense', 'health', 'types', 'source', 'family']
|
52 |
-
|
|
|
|
|
|
|
|
|
|
|
53 |
|
54 |
for i in range(len(df)):
|
55 |
url = df['image'].values[i]
|
|
|
48 |
st.image(image.resize(( int(image.width * scale), int(image.height * scale))))
|
49 |
|
50 |
def display_heroes_from_df(df):
|
51 |
+
display_cols = ['image','name', 'color', 'star', 'class', 'speed', 'power', 'attack', 'defense', 'health', 'types', 'source', 'family']
|
52 |
+
df[display_cols]
|
53 |
+
st.dataframe(df[display_cols],
|
54 |
+
column_config={
|
55 |
+
"image": st.column_config.ImageColumn("Avatar", help="")},
|
56 |
+
use_container_width=True,
|
57 |
+
hide_index=True)
|
58 |
|
59 |
for i in range(len(df)):
|
60 |
url = df['image'].values[i]
|