text_plain_output_1.png
from sklearn.linear_model import LinearRegression

import numpy as np

reg = LinearRegression()

model = reg.fit(x_train, y_train)

y_pred = model.predict(x_test).round()

def diabetes_prediction():
    preg = int(input('Enter the prega value:'))
    glu = int(input('Enter the glu value:'))
    BP = int(input('Enter the BP value:'))
    SkinThik = int(input('Enter the SkinThink value:'))
    Insulin = int(input('Enter the Insulin value:'))
    Age = int(input('Enter the Age value:'))
    Value_testing = np.array([preg, glu, BP, SkinThik, Insulin, Age]).reshape(-1, 6)
    prediction = model.predict(Value_testing).round()

diabetes_prediction()