Update app.py
Browse files
app.py
CHANGED
|
@@ -94,17 +94,18 @@ col1, col2 = st.columns([1, 2])
|
|
| 94 |
with col1:
|
| 95 |
st.subheader("🔧 Define Your Function")
|
| 96 |
|
| 97 |
-
#
|
| 98 |
-
st.
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 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(
|