Alvin
August 28, 2025, 5:46pm
1
https://machine-learning-1-lr-on-advertising.streamlit.app/
import streamlit as st
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import numpy as np
from sklearn.linear_model import LinearRegression
#--------------------------------------------------------------------
# Step 1: Load Dataset
#--------------------------------------------------------------------
data = {
"TV Advertising Budget ($)": [100, 150, 200, 250, 300],
"Sales (units)": [20, 25, 30, 35, 40]
}
advert = pd.DataFrame(data)
#--------------------------------------------------------------------
# Step 2: Train Linear Regression Model
#--------------------------------------------------------------------
X = advert[["TV Advertising Budget ($)"]]
This file has been truncated. show original
it keeps showing this and i can’t deploy it
pls help.. anyone! help!
been trying for weeks.. its actually a very simple program but i’m not sure why it won’t deploy…
thank you so much!