trohith89 commited on
Commit
6cfd7b8
·
verified ·
1 Parent(s): 15de597

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -86,7 +86,7 @@ st.markdown(
86
  border-radius: 5px;
87
  padding: 10px;
88
  }
89
- /* Hoverable tooltip styling */
90
  .tooltip {
91
  position: relative;
92
  display: inline-block;
@@ -124,7 +124,7 @@ col1, col2 = st.columns([1, 2])
124
  # Left Section: User Input
125
  with col1:
126
  st.subheader("🔧 Define Your Function")
127
-
128
  # Tooltip with instructions when hovering over the function input
129
  st.markdown(
130
  """
@@ -215,7 +215,7 @@ with col2:
215
 
216
  # Tangent line at the current gradient descent point
217
  current_x = st.session_state.x
218
- tangent_x = np.linspace(current_x - 5, current_x + 5, 200) # Extended range for tangent line
219
  tangent_y = tangent_line(st.session_state.func_input, current_x, tangent_x)
220
  fig.add_trace(go.Scatter(
221
  x=tangent_x,
 
86
  border-radius: 5px;
87
  padding: 10px;
88
  }
89
+ /* Tooltip styling */
90
  .tooltip {
91
  position: relative;
92
  display: inline-block;
 
124
  # Left Section: User Input
125
  with col1:
126
  st.subheader("🔧 Define Your Function")
127
+
128
  # Tooltip with instructions when hovering over the function input
129
  st.markdown(
130
  """
 
215
 
216
  # Tangent line at the current gradient descent point
217
  current_x = st.session_state.x
218
+ tangent_x = np.linspace(-10, 10, 200) # Adjusting range to cover entire plot
219
  tangent_y = tangent_line(st.session_state.func_input, current_x, tangent_x)
220
  fig.add_trace(go.Scatter(
221
  x=tangent_x,