Machine Learning Help

I was working on a machine learning model and I came across a result that did not make sense at all. Here is a picture of it:
image
According to the online tutorial I was following, this should have resulted in an accurate polymodal regression line but I got a really weird graph. I’m not sure what went wrong. Any help is greatly appreciated!

Code(Really Messy. Sorry):

import matplotlib.pyplot as plt
import csv as csv
from sklearn.linear_model import LinearRegression
from sklearn.model_selection import train_test_split
import numpy as np
import operator
from sklearn.preprocessing import PolynomialFeatures
x = ['89', '66', '46', '79', '54', '43', '47', '47', '71', '108', '63', '68', '101', '57', '93', '51', '79', '54', '91', '59', '54', '53', '53', '103', '58', '59', '93', '51', '155', '52', '53', '78', '68', '86', '57', '47', '54', '61', '50', '54', '58', '81', '43', '80', '92', '56', '78', '48', '54', '79', '66', '88', '45', '59', '62', '59', '46', '54', '63', '56', '65', '54', '64', '53', '53', '96', '49', '55', '103', '53', '54', '60', '63', '49', '66', '44', '52', '55', '66', '105', '51', '56', '56', '51', '45', '53', '84', '41', '124', '48', '87', '67', '52', '55', '69', '43', '49', '66', '46', '49', '70', '66', '70', '55', '66', '60', '58', '61', '57', '63', '68', '55', '53', '60', '76', '71', '63', '45', '61', '91', '64', '46', '58', '54', '57', '77', '144', '49', '64', '63', '77', '49', '46', '119', '57', '58', '69', '95', '53', '61', '69', '62', '60', '58', '52', '68', '63', '176', '57', '124', '58', '74', '111', '60', '50', '55', '75', '77', '44', '79', '57', '41', '48', '67', '57', '83', '53', '52', '59', '59', '47', '53', '70', '96', '49', '63', '45', '56', '79', '49', '50', '56', '59', '59', '43', '53', '58', '59', '98', '112', '46', '110', '118', '59', '45', '72', '50', '63', '111', '93', '67', '55', '54', '43', '47', '43', '72', '112', '61', '62', '67', '88', '79', '60', '54', '54', '57', '75', '116', '60', '54', '84', '59', '53', '53', '49', '73', '88', '59', '56', '66', '87', '64', '90', '74', '55', '43', '111', '41', '69', '63', '61', '43', '78', '76', '110', '63', '73', '50', '90', '49', '70', '107', '55', '109', '60', '115', '54', '41', '70', '48', '45', '63', '44', '43', '53', '50', '44', '61', '60', '50', '61', '51', '76', '62', '78', '75', '96', '61', '48', '49', '52', '66', '38', '111', '51', '64', '80', '51', '50', '68', '49', '59', '59', '55', '58', '52', '48', '66', '53', '63', '56', '89', '47', '112', '49', '75', '71', '79', '79', '43', '56', '50', '37', '53', '61', '52', '107', '41', '104', '69', '69', '67', '61', '57', '56', '51', '63', '65', '62', '53', '60', '56', '61', '41', '66', '51', '55', '64', '62', '44', '76', '61', '47', '95', '64', '89', '69', '93', '63', '62', '61', '52', '50', '101', '51', '98', '146', '98', '67', '44', '71', '50', '102', '88', '72', '72', '50', '104', '119', '66', '48', '54', '60', '54', '68', '64', '37', '45', '68', '66', '49', '60', '61', '47', '52', '98', '52', '50', '52', '49', '69', '60', '71', '53', '69', '66', '51', '63', '58', '63', '109', '99', '75', '59', '65', '53', '50', '54', '59', '51', '43', '92', '66', '90', '53', '51', '59', '142', '60', '84', '64', '70', '67', '52', '106', '55', '60', '112', '86', '62', '56', '52', '52', '54', '63', '61', '50', '110', '57', '52', '66', '74', '61', '70', '83', '55', '66', '97', '55', '70', '51', '90', '63', '51', '39', '48', '47', '53', '57', '82', '44', '60', '35', '86', '79', '80', '62', '59', '82', '49', '53', '61', '53', '54', '77', '47', '68', '56', '79', '67', '43', '57', '50', '64', '74', '67', '52', '71', '72', '42', '88', '54', '117', '55', '92', '78', '52', '75', '75', '55', '60', '48', '60', '50', '74', '124', '47', '58', '48', '61', '54', '54', '51', '62', '68', '53', '65', '95', '81', '58', '47', '47', '49', '84', '50', '57', '60', '83', '55', '57', '72', '52', '74', '58', '97', '86', '65', '54', '51', '77', '82', '57', '55', '60', '65', '61', '42', '56', '97', '57', '49', '123', '48', '67', '61', '78', '77', '57', '71', '113', '58', '39', '94', '106', '79', '47', '51', '84', '69', '51', '55', '52', '63', '55', '79', '97', '46', '55', '55', '55', '86', '108', '64', '51', '82', '54', '55', '56', '44', '54', '58', '47', '53', '55', '71', '66', '90', '108', '147', '78', '73', '48', '62', '61', '64', '46', '58', '61', '54', '78', '101', '56', '62', '57', '65', '66', '55', '51', '84', '62', '75', '56', '55', '110', '59', '47', '51', '46', '64', '60', '67', '56', '75', '57', '49', '72', '59', '55', '60', '65', '89', '69', '50', '63', '67']
y = ['124.6', '057.8', '334.3', '909.1', '412.4', '987.5', '473.2', '156.2', '244.6', '255.1', '403.9', '445.0', '577.6', '493.0', '869.0', '407.3', '688.8', '287.9', '796.3', '320.1', '151.2', '185.7', '516.3', '795.2', '276.0', '969.7', '193.6', '924.5', '106.1', '691.8', '169.8', '658.5', '775.1', '444.5', '161.2', '787.0', '319.4', '195.7', '280.9', '828.6', '144.4', '141.3', '387.5', '965.2', '154.3', '042.8', '795.6', '405.4', '575.4', '354.0', '152.3', '901.9', '086.2', '076.5', '597.6', '402.5', '861.2', '236.5', '145.8', '408.0', '678.6', '037.0', '005.5', '109.8', '432.7', '782.8', '380.1', '048.5', '146.6', '466.6', '595.8', '347.9', '810.5', '663.8', '043.0', '147.7', '246.9', '014.2', '360.5', '945.3', '895.3', '135.1', '886.1', '791.7', '924.0', '316.8', '902.5', '164.0', '831.9', '295.1', '147.6', '863.8', '497.2', '819.8', '680.0', '049.3', '881.4', '976.9', '245.9', '719.7', '761.4', '928.7', '483.1', '152.9', '775.5', '183.9', '588.6', '484.4', '717.5', '395.8', '996.5', '635.2', '568.7', '653.2', '077.8', '957.4', '109.0', '253.5', '027.8', '032.3', '599.5', '937.3', '205.5', '438.8', '267.6', '974.7', '946.9', '983.3', '373.9', '900.0', '484.5', '102.0', '688.8', '807.6', '189.6', '402.0', '754.7', '389.6', '771.7', '835.2', '213.3', '925.9', '337.1', '410.5', '852.2', '046.0', '466.0', '842.8', '465.8', '847.0', '770.6', '208.5', '597.4', '735.4', '796.4', '806.1', '360.9', '631.4', '160.2', '209.0', '480.1', '391.9', '564.0', '196.6', '461.5', '263.1', '631.8', '635.1', '244.5', '495.7', '867.1', '123.1', '714.9', '725.2', '723.9', '804.1', '858.9', '210.4', '505.1', '801.5', '531.6', '315.2', '622.6', '976.4', '162.0', '411.1', '878.9', '691.8', '899.1', '008.8', '335.0', '172.2', '009.1', '528.6', '661.1', '527.9', '168.7', '059.8', '276.2', '600.4', '300.5', '280.9', '204.8', '789.6', '859.4', '082.7', '370.6', '994.9', '207.0', '006.0', '291.5', '124.5', '495.1', '778.4', '003.2', '878.6', '940.2', '893.7', '484.1', '672.3', '689.9', '397.9', '525.1', '962.7', '214.1', '658.4', '075.1', '963.5', '740.6', '117.0', '025.1', '878.0', '331.1', '053.2', '192.0', '243.7', '980.9', '097.1', '403.5', '258.1', '914.3', '642.4', '882.9', '996.5', '994.4', '702.3', '426.4', '482.4', '521.9', '063.4', '499.8', '928.8', '530.3', '534.7', '775.5', '212.7', '821.1', '608.0', '210.5', '425.3', '275.7', '335.7', '219.9', '015.3', '465.2', '292.6', '878.3', '756.1', '865.3', '203.5', '478.3', '036.9', '326.2', '629.0', '032.3', '387.7', '077.1', '117.5', '990.3', '741.1', '260.8', '129.0', '936.2', '224.2', '805.8', '021.5', '383.0', '082.3', '901.9', '361.8', '776.9', '204.9', '467.7', '461.4', '896.5', '187.5', '504.1', '493.4', '329.8', '373.3', '092.9', '827.2', '468.7', '367.9', '840.8', '406.9', '389.1', '896.2', '010.7', '004.5', '275.9', '872.6', '811.2', '608.3', '920.4', '619.4', '564.0', '806.1', '401.4', '192.0', '058.5', '870.9', '971.5', '314.0', '837.2', '957.1', '021.4', '332.5', '041.3', '072.0', '803.2', '456.3', '642.4', '378.8', '093.7', '842.8', '323.0', '875.2', '575.9', '318.0', '981.0', '021.2', '832.7', '883.9', '733.7', '272.5', '995.0', '953.9', '029.3', '986.9', '757.7', '785.6', '662.4', '252.5', '102.2', '499.8', '033.7', '311.6', '614.2', '323.7', '101.1', '963.9', '376.4', '805.4', '824.7', '381.8', '357.9', '191.7', '246.1', '462.6', '304.1', '916.6', '170.9', '791.6', '291.4', '154.4', '180.5', '927.6', '770.4', '938.4', '057.4', '345.9', '982.5', '457.5', '501.3', '440.0', '838.2', '890.7', '796.6', '155.7', '158.3', '740.4', '624.2', '028.1', '573.1', '414.9', '192.4', '563.3', '447.6', '468.9', '932.4', '049.1', '042.3', '348.1', '524.2', '806.8', '896.8', '757.3', '026.1', '368.5', '189.5', '459.3', '887.1', '666.7', '699.0', '180.1', '930.6', '273.2', '059.7', '542.2', '872.6', '662.7', '554.4', '447.4', '363.6', '967.6', '533.8', '668.4', '109.7', '893.0', '935.8', '966.9', '641.0', '726.7', '402.6', '641.1', '795.9', '255.8', '787.2', '478.8', '131.7', '707.8', '721.6', '603.7', '650.1', '209.4', '080.3', '234.7', '919.4', '423.0', '101.5', '131.7', '016.2', '742.8', '694.4', '022.9', '739.3', '306.4', '762.5', '016.9', '315.6', '482.7', '375.8', '122.8', '040.1', '101.0', '358.8', '826.6', '598.9', '406.8', '227.8', '901.3', '847.8', '335.2', '680.1', '890.5', '328.1', '069.3', '038.4', '963.7', '798.7', '670.6', '779.2', '493.4', '245.4', '514.3', '596.4', '589.3', '567.3', '819.6', '688.8', '940.4', '691.0', '315.5', '375.4', '624.1', '827.9', '922.6', '852.3', '257.1', '107.8', '802.3', '585.8', '117.0', '217.9', '427.4', '254.8', '750.2', '418.4', '293.6', '270.2', '269.3', '759.4', '199.6', '065.8', '710.2', '394.5', '999.4', '273.5', '885.7', '907.4', '827.0', '656.0', '654.6', '777.8', '299.0', '900.6', '077.4', '563.8', '121.0', '720.7', '072.5', '998.8', '545.1', '289.2', '225.8', '873.2', '165.4', '044.2', '051.1', '456.0', '848.4', '090.8', '933.6', '983.9', '341.9', '523.1', '480.6', '090.8', '111.5', '905.4', '045.6', '528.3', '192.6', '986.7', '947.0', '524.4', '592.1', '415.3', '200.0', '903.5', '417.9', '243.9', '248.0', '294.6', '881.0', '001.1', '648.3', '211.9', '097.9', '366.8', '478.3', '813.3', '841.4', '496.7', '859.5', '687.5', '124.7', '232.2', '801.5', '360.3', '291.4', '282.9', '039.5', '768.7', '929.5', '061.5', '139.2', '101.1', '254.8', '489.7', '133.4', '710.5', '517.1', '189.0', '914.4', '341.7', '030.3', '969.2', '688.2', '010.6', '101.0', '422.0', '934.8', '173.7', '762.4', '531.8', '387.2', '949.0', '209.0', '148.8', '349.0', '729.6', '467.8', '932.4', '935.9', '720.9', '931.2', '533.4', '697.1', '781.5', '359.5', '513.3', '069.2', '285.1', '851.4', '666.9', '286.8', '356.6', '843.4', '427.6', '581.0', '481.4', '943.5', '233.2', '862.1', '153.0', '445.5', '944.5', '603.3', '749.5', '597.7', '218.3', '374.9', '206.4', '094.5']

L = sorted(zip(x, y), key=operator.itemgetter(0))
xx, yy = zip(*L)
x = np.reshape(x, (-1, 1))
y = np.reshape(y, (-1, 1))
poly_reg = PolynomialFeatures(degree=5)
X_poly = poly_reg.fit_transform(x)
lin_reg2 = LinearRegression()
lin_reg2.fit(X_poly,y)

x_predict = list(range(150))
y_predict = []
for i in x_predict:
    y_predict.append(lin_reg2.predict(poly_reg.fit_transform([[i]]))[0][0])
plt.scatter(xx, yy, s=0.1)
plt.plot(x_predict, y_predict, color="red")
plt.show()

Here is the tutorial I was following:

Thanks!