Mpavan45 commited on
Commit
90c2389
·
verified ·
1 Parent(s): c0093b4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -8
app.py CHANGED
@@ -4,7 +4,8 @@ import plotly.graph_objects as go
4
 
5
  # Title of the app
6
  st.set_page_config(page_title="Interactive Gradient Descent Visualizer", layout="wide")
7
- st.markdown("## 🌟 Gradient Descent Visualizer")
 
8
 
9
  # Safe function evaluation
10
  def evaluate_function(expression, x_value):
@@ -53,17 +54,11 @@ left_col, right_col = st.columns([1, 2]) # 1 for left, 2 for right grid proport
53
  with left_col:
54
  st.markdown("### Input Your Function")
55
  function_input = st.text_input(
56
- "Enter Function:",
57
  "x**2 + x",
58
  key="math_function",
59
  on_change=reset_session_state
60
  )
61
- st.markdown("**Examples**:")
62
- st.markdown("`np.sin(x)`")
63
- st.markdown("`np.sin(x) + x**2`")
64
- st.markdown("`x * np.sin(x)`")
65
- st.markdown("`np.sin(x)**2 + x`")
66
-
67
  st.markdown("### Set Parameters")
68
  initial_point = st.number_input(
69
  "Initial Value of x",
 
4
 
5
  # Title of the app
6
  st.set_page_config(page_title="Interactive Gradient Descent Visualizer", layout="wide")
7
+ st.markdown("<h1 style='text-align: center; color: grey;'> 🌟 Gradient Descent Visualizer</h1>", unsafe_allow_html=True)
8
+
9
 
10
  # Safe function evaluation
11
  def evaluate_function(expression, x_value):
 
54
  with left_col:
55
  st.markdown("### Input Your Function")
56
  function_input = st.text_input(
57
+ "Enter Function:Ex:'x**2'`np.sin(x)`,",
58
  "x**2 + x",
59
  key="math_function",
60
  on_change=reset_session_state
61
  )
 
 
 
 
 
 
62
  st.markdown("### Set Parameters")
63
  initial_point = st.number_input(
64
  "Initial Value of x",