Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -61,6 +61,17 @@ scores_df_sorted = scores_df.sort_values(by='Combined Score', ascending=False)
|
|
61 |
# Layout for displaying overview and details
|
62 |
col1, col2 = st.columns([1, 3])
|
63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
with col1:
|
65 |
st.subheader("Stock Overview")
|
66 |
# Convert 'Combined Score' to numeric if it's not already
|
|
|
61 |
# Layout for displaying overview and details
|
62 |
col1, col2 = st.columns([1, 3])
|
63 |
|
64 |
+
def color_combined_score(value):
|
65 |
+
"""Colors the combined score cell based on its value."""
|
66 |
+
if value > 0:
|
67 |
+
color = 'green'
|
68 |
+
elif value < 0:
|
69 |
+
color = 'red'
|
70 |
+
else:
|
71 |
+
color = 'none'
|
72 |
+
return f'background-color: {color};'
|
73 |
+
|
74 |
+
|
75 |
with col1:
|
76 |
st.subheader("Stock Overview")
|
77 |
# Convert 'Combined Score' to numeric if it's not already
|