correctifs

This commit is contained in:
hugo.pradier2
2024-06-21 14:51:06 +02:00
parent 2d1c867bed
commit 089cc66042
2 changed files with 4 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
import streamlit as st
from sklearn.linear_model import LinearRegression
import pandas as pd
st.header("Prediction: Regression")
@@ -21,7 +22,7 @@ if "data" in st.session_state:
st.subheader("Enter values for prediction")
pred_values = [st.number_input(f"Value for {feature}", value=0.0) for feature in data_name]
prediction = model.predict([pred_values])
prediction = model.predict(pd.DataFrame([pred_values], columns=data_name))
st.write("Prediction:", prediction[0])
else: