Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -50,6 +50,16 @@ st.markdown(
|
|
| 50 |
border-radius: 10px;
|
| 51 |
padding: 5px;
|
| 52 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
</style>
|
| 54 |
""",
|
| 55 |
unsafe_allow_html=True,
|
|
@@ -173,24 +183,13 @@ with col2:
|
|
| 173 |
except Exception as e:
|
| 174 |
st.error(f"⚠️ Error in visualization: {str(e)}")
|
| 175 |
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
# Custom HTML/CSS for iteration and current point display with pink background and black borders
|
| 179 |
-
col5.markdown(
|
| 180 |
f"""
|
| 181 |
-
<div
|
| 182 |
-
|
| 183 |
-
<span style="color:black;">{st.session_state.iteration}</span>
|
| 184 |
</div>
|
| 185 |
-
""
|
| 186 |
-
|
| 187 |
-
)
|
| 188 |
-
|
| 189 |
-
col7.markdown(
|
| 190 |
-
f"""
|
| 191 |
-
<div style="background-color:#FFB6C1; border: 2px solid black; border-radius: 8px; padding: 4px;">
|
| 192 |
-
<span style="color:black; font-weight: bold;">📍 Current Point:</span> <br>
|
| 193 |
-
<span style="color:black;">({st.session_state.x:.4f}, {st.session_state.y_vals[-1]:.4f})</span>
|
| 194 |
</div>
|
| 195 |
""",
|
| 196 |
unsafe_allow_html=True,
|
|
|
|
| 50 |
border-radius: 10px;
|
| 51 |
padding: 5px;
|
| 52 |
}
|
| 53 |
+
.info-box {
|
| 54 |
+
display: inline-block;
|
| 55 |
+
background-color:#FFB6C1;
|
| 56 |
+
border: 2px solid black;
|
| 57 |
+
border-radius: 8px;
|
| 58 |
+
padding: 5px;
|
| 59 |
+
margin: 5px;
|
| 60 |
+
text-align: center;
|
| 61 |
+
width: auto;
|
| 62 |
+
}
|
| 63 |
</style>
|
| 64 |
""",
|
| 65 |
unsafe_allow_html=True,
|
|
|
|
| 183 |
except Exception as e:
|
| 184 |
st.error(f"⚠️ Error in visualization: {str(e)}")
|
| 185 |
|
| 186 |
+
st.markdown(
|
|
|
|
|
|
|
|
|
|
| 187 |
f"""
|
| 188 |
+
<div class="info-box">
|
| 189 |
+
🧑💻 Iteration: {st.session_state.iteration}
|
|
|
|
| 190 |
</div>
|
| 191 |
+
<div class="info-box">
|
| 192 |
+
📍 Current Point: ({st.session_state.x:.4f}, {st.session_state.y_vals[-1]:.4f})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 193 |
</div>
|
| 194 |
""",
|
| 195 |
unsafe_allow_html=True,
|