Nifdi01 commited on
Commit
e90c051
1 Parent(s): fb5a1bd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -5
app.py CHANGED
@@ -54,15 +54,11 @@ st.write(coeff_df)
54
 
55
 
56
  coefficients = [i for i in regressor.coef_]
57
- formatted_coefficients = [format(coeff, ".2e") for coeff in coefficients if coeff != 0]
58
-
59
  terms = [f'{coeff}X^{i}' for i, coeff in enumerate(coefficients) if coeff != 0]
60
 
61
- formatted_intercept = format(regressor.intercept_, ".2e")
62
-
63
  latex_equation = r'''
64
  Our Equation: {} + {}
65
- '''.format(formatted_intercept, ' + '.join(formatted_coefficients))
66
 
67
  st.write("### Polynomial Equation")
68
  st.latex(latex_equation)
 
54
 
55
 
56
  coefficients = [i for i in regressor.coef_]
 
 
57
  terms = [f'{coeff}X^{i}' for i, coeff in enumerate(coefficients) if coeff != 0]
58
 
 
 
59
  latex_equation = r'''
60
  Our Equation: {} + {}
61
+ '''.format(regressor.intercept_, ' + '.join(terms))
62
 
63
  st.write("### Polynomial Equation")
64
  st.latex(latex_equation)