selva1909 commited on
Commit
b64fdba
·
verified ·
1 Parent(s): ff8eb00

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +13 -2
src/streamlit_app.py CHANGED
@@ -7,6 +7,19 @@ from sklearn.metrics import mean_squared_error
7
 
8
  st.set_page_config(page_title="Linear Regression Playground", layout="centered")
9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  st.title("📉 Linear Regression Playground (2D & 3D)")
11
  st.write("Experiment with regression, noise, slope, intercept — and visualize the model!")
12
 
@@ -153,7 +166,5 @@ if st.session_state.trained:
153
 
154
  st.latex(rf"z = {a:.3f}x_1 + {b:.3f}x_2 + {c:.3f}")
155
 
156
-
157
-
158
  else:
159
  st.info("Click **Generate & Train Model** to begin.")
 
7
 
8
  st.set_page_config(page_title="Linear Regression Playground", layout="centered")
9
 
10
+ # --- FIX: Ensure Equation Always Displays Fully ---
11
+ st.markdown("""
12
+ <style>
13
+ .mathjax-chtml, .MathJax, .mathjax-container {
14
+ white-space: normal !important;
15
+ overflow-x: visible !important;
16
+ text-align: left !important;
17
+ padding: 8px 0 !important;
18
+ }
19
+ </style>
20
+ """, unsafe_allow_html=True)
21
+
22
+
23
  st.title("📉 Linear Regression Playground (2D & 3D)")
24
  st.write("Experiment with regression, noise, slope, intercept — and visualize the model!")
25
 
 
166
 
167
  st.latex(rf"z = {a:.3f}x_1 + {b:.3f}x_2 + {c:.3f}")
168
 
 
 
169
  else:
170
  st.info("Click **Generate & Train Model** to begin.")