commit 02009174b386430931f13afbe0b4c13cacd8483e Author: User Name Date: Sat Jun 7 23:27:56 2025 +0200 init diff --git a/linear_regression_model.pkl b/linear_regression_model.pkl new file mode 100644 index 0000000..20da6a5 Binary files /dev/null and b/linear_regression_model.pkl differ diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..50eef46 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,7 @@ + +fastapi +uvicorn +joblib +numpy +pandas +scikit-learn diff --git a/scaler.pkl b/scaler.pkl new file mode 100644 index 0000000..81aebe0 Binary files /dev/null and b/scaler.pkl differ diff --git a/streamlit.py b/streamlit.py new file mode 100644 index 0000000..bb8c693 --- /dev/null +++ b/streamlit.py @@ -0,0 +1,22 @@ +import streamlit as st +import joblib + +# Load the model and scaler +model = joblib.load("linear_regression_model.pkl") +scaler = joblib.load("scaler.pkl") + +# Streamlit app +st.title("MetaBrains Student Test Score Predictor") +st.write("Enter the number of hours studied to predict the test score.") + +# User input +hours = st.number_input("Hours studied:", min_value=0.0, step=1.0) + +if st.button("Predict"): + try: + data = [[hours]] + scaled_data = scaler.transform(data) + prediction = model.predict(scaled_data) + st.write(f"Predicted Test Score: {prediction[0]:.2f}") + except Exception as e: + st.error(f"Error: {e}")