Mpavan45 commited on
Commit
4194c27
·
verified ·
1 Parent(s): 62e27a7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -114,7 +114,7 @@ with right_col:
114
 
115
  # Plot function and gradient descent steps
116
  fig = go.Figure()
117
- fig.add_trace(go.Scatter(x=x_range, y=y_range, mode='lines', name='Function'))
118
 
119
  # Add current point
120
  x_current, y_current = st.session_state.history[st.session_state.current_index]
@@ -122,7 +122,7 @@ with right_col:
122
 
123
  # Add tangent line
124
  tangent_y = calculate_tangent(function_input, x_current, x_range)
125
- fig.add_trace(go.Scatter(x=x_range, y=tangent_y, mode='lines', name='Tangent Line', line=dict(dash='dash')))
126
 
127
  # Layout adjustments
128
  fig.update_layout(
 
114
 
115
  # Plot function and gradient descent steps
116
  fig = go.Figure()
117
+ fig.add_trace(go.Scatter(x=x_range, y=y_range, mode='lines', name='Function',line=dict(color='orange')))
118
 
119
  # Add current point
120
  x_current, y_current = st.session_state.history[st.session_state.current_index]
 
122
 
123
  # Add tangent line
124
  tangent_y = calculate_tangent(function_input, x_current, x_range)
125
+ fig.add_trace(go.Scatter(x=x_range, y=tangent_y, mode='lines', name='Tangent Line', line=dict(dash='dash',color='green')))
126
 
127
  # Layout adjustments
128
  fig.update_layout(