trohith89 commited on
Commit
c96a94a
·
verified ·
1 Parent(s): fd1dd80

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -11
app.py CHANGED
@@ -94,17 +94,18 @@ col1, col2 = st.columns([1, 2])
94
  with col1:
95
  st.subheader("🔧 Define Your Function")
96
 
97
- # Instructional message for function input
98
- st.markdown(
99
- """
100
- **How to input your function:**
101
- - Use `x` for the variable.
102
- - Example: For \(x^2\), input `x**2`.
103
- - For sine function, input `np.sin(x)`.
104
- - For logarithm, input `np.log(x)`.
105
- - For other mathematical operations, use `np` (e.g., `np.exp(x)`).
106
- """
107
- )
 
108
 
109
  # Use text input for the user to define a function
110
  func_input = st.text_input(
 
94
  with col1:
95
  st.subheader("🔧 Define Your Function")
96
 
97
+ # Show instructions when hovering over the function input
98
+ if st.session_state.func_input:
99
+ st.info(
100
+ """
101
+ **How to input your function:**
102
+ - Use `x` for the variable.
103
+ - Example: For \(x^2\), input `x**2`.
104
+ - For sine function, input `np.sin(x)`.
105
+ - For logarithm, input `np.log(x)`.
106
+ - For other mathematical operations, use `np` (e.g., `np.exp(x)`).
107
+ """
108
+ )
109
 
110
  # Use text input for the user to define a function
111
  func_input = st.text_input(