integracja z gui

This commit is contained in:
Szymon Obst 2023-10-17 18:50:02 +02:00
parent 73884bb32b
commit f6e8f0710a
5 changed files with 168 additions and 76 deletions

79
Gui.py Normal file
View File

@ -0,0 +1,79 @@
# Import Module
from tkinter import *
import pickle
import pandas as pd
import numpy as np
#Styl
tlo = "grey"
guziki = "#60839D"
# Create Object
root = Tk()
root.geometry('1000x600')
root.configure(bg=tlo)
def update():
dane = [address1.__getattribute__,address2.__getattribute__,address3.__getattribute__]
return None
#Wczytanie modelu
model = pickle.load(open('mieszkania_model', 'rb'))
def cena_mieszkania(pokoje, metraz, rok):
mieszkanie = pd.DataFrame([[pokoje, metraz, rok]], columns=['pokoje', 'metraz', 'rok'])
cena = model.predict(mieszkanie).item()
return np.round(cena, 2)
# Funkcja tworzy nowe okno ktore wyswietla predykcje ceny
def Oblicz():
newWindow = Toplevel(root)
newWindow.geometry('600x300')
newWindow.title("wynik")
newWindow.config(bg=tlo)
# okno
T4 = Label(newWindow,bg=tlo,fg="white",height=3,width=37, text = "Potencjalna cena mieszkania:", bd = 0, relief=RAISED).place(x = 100, y= 50)
address1 = Label(newWindow,width=37,height=3,bg=guziki,text = wyznacz_cene()).place(x = 100, y= 100)
update()
return None
def reset():
return None
Button(root,text="Oblicz",font="arial 20 bold",command=Oblicz ).place(x= 800, y=500)
#Pola do wpisywania
# metraż
address1 = Text(root,width=37,height=3,bg=guziki)
address1.place(x = 100, y= 100)
T = Label(root,bg=tlo,fg="white",height=3,width=37, text = "Liczba Pokoi", bd = 0, relief=RAISED).place(x = 100, y= 50)
# liczba pokoi
address2 = Text(root,width=37,height=3,bg=guziki)
address2.place(x = 100, y= 200)
T2 = Label(root,bg=tlo,fg="white",height=3,width=37, text = "Metraż", bd = 0, relief=RAISED).place(x = 100, y= 150)
# Rok budowy
address3 = Text(root,width=37,height=3,bg=guziki)
address3.place(x = 100, y= 300)
T3 = Label(root,bg=tlo,fg="white",height=3,width=37, text = "Rok Budowy", bd = 0, relief=RAISED).place(x = 100, y= 250)
Output = Text(root, height = 5,
width = 25,
bg = tlo)
def wyznacz_cene():
pokoje = address1.get("1.0",END)
metraz = address2.get("1.0",END)
rok = address3.get("1.0",END)
return cena_mieszkania(pokoje,metraz,rok)
# Execute Tkinter
root.mainloop()

View File

@ -16,7 +16,7 @@
},
{
"cell_type": "code",
"execution_count": 118,
"execution_count": 9,
"metadata": {},
"outputs": [
{
@ -40,7 +40,7 @@
},
{
"cell_type": "code",
"execution_count": 119,
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
@ -57,7 +57,7 @@
},
{
"cell_type": "code",
"execution_count": 120,
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
@ -66,7 +66,7 @@
},
{
"cell_type": "code",
"execution_count": 121,
"execution_count": 12,
"metadata": {},
"outputs": [
{
@ -452,7 +452,7 @@
"[2547 rows x 26 columns]"
]
},
"execution_count": 121,
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
@ -470,7 +470,7 @@
},
{
"cell_type": "code",
"execution_count": 122,
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
@ -479,7 +479,7 @@
},
{
"cell_type": "code",
"execution_count": 123,
"execution_count": 14,
"metadata": {},
"outputs": [
{
@ -865,7 +865,7 @@
"[462 rows x 25 columns]"
]
},
"execution_count": 123,
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
@ -876,7 +876,7 @@
},
{
"cell_type": "code",
"execution_count": 124,
"execution_count": 15,
"metadata": {},
"outputs": [],
"source": [
@ -885,7 +885,7 @@
},
{
"cell_type": "code",
"execution_count": 125,
"execution_count": 16,
"metadata": {},
"outputs": [
{
@ -979,7 +979,7 @@
"[462 rows x 1 columns]"
]
},
"execution_count": 125,
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
@ -997,7 +997,7 @@
},
{
"cell_type": "code",
"execution_count": 126,
"execution_count": 17,
"metadata": {},
"outputs": [],
"source": [
@ -1006,7 +1006,7 @@
},
{
"cell_type": "code",
"execution_count": 127,
"execution_count": 18,
"metadata": {},
"outputs": [
{
@ -1392,7 +1392,7 @@
"[418 rows x 25 columns]"
]
},
"execution_count": 127,
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
@ -1410,7 +1410,7 @@
},
{
"cell_type": "code",
"execution_count": 128,
"execution_count": 19,
"metadata": {},
"outputs": [],
"source": [
@ -1419,7 +1419,7 @@
},
{
"cell_type": "code",
"execution_count": 129,
"execution_count": 20,
"metadata": {},
"outputs": [],
"source": [
@ -1428,7 +1428,7 @@
},
{
"cell_type": "code",
"execution_count": 130,
"execution_count": 21,
"metadata": {},
"outputs": [],
"source": [
@ -1437,7 +1437,7 @@
},
{
"cell_type": "code",
"execution_count": 131,
"execution_count": 22,
"metadata": {},
"outputs": [],
"source": [
@ -1453,7 +1453,7 @@
},
{
"cell_type": "code",
"execution_count": 132,
"execution_count": 23,
"metadata": {},
"outputs": [],
"source": [
@ -1462,7 +1462,7 @@
},
{
"cell_type": "code",
"execution_count": 133,
"execution_count": 24,
"metadata": {},
"outputs": [],
"source": [
@ -1471,7 +1471,7 @@
},
{
"cell_type": "code",
"execution_count": 134,
"execution_count": 25,
"metadata": {},
"outputs": [],
"source": [
@ -1494,7 +1494,7 @@
},
{
"cell_type": "code",
"execution_count": 135,
"execution_count": 26,
"metadata": {},
"outputs": [],
"source": [
@ -1503,7 +1503,7 @@
},
{
"cell_type": "code",
"execution_count": 136,
"execution_count": 27,
"metadata": {},
"outputs": [],
"source": [
@ -1512,7 +1512,7 @@
},
{
"cell_type": "code",
"execution_count": 137,
"execution_count": 28,
"metadata": {},
"outputs": [],
"source": [
@ -1521,7 +1521,7 @@
},
{
"cell_type": "code",
"execution_count": 138,
"execution_count": 29,
"metadata": {},
"outputs": [],
"source": [
@ -1530,7 +1530,7 @@
},
{
"cell_type": "code",
"execution_count": 139,
"execution_count": 30,
"metadata": {},
"outputs": [],
"source": [
@ -1540,7 +1540,7 @@
},
{
"cell_type": "code",
"execution_count": 140,
"execution_count": 31,
"metadata": {},
"outputs": [
{
@ -1643,7 +1643,7 @@
"max 6.000000e+06 11.000000 404.000000 2022.000000"
]
},
"execution_count": 140,
"execution_count": 31,
"metadata": {},
"output_type": "execute_result"
}
@ -1654,7 +1654,7 @@
},
{
"cell_type": "code",
"execution_count": 141,
"execution_count": 32,
"metadata": {},
"outputs": [
{
@ -1784,7 +1784,7 @@
"[1763 rows x 4 columns]"
]
},
"execution_count": 141,
"execution_count": 32,
"metadata": {},
"output_type": "execute_result"
}
@ -1802,7 +1802,7 @@
},
{
"cell_type": "code",
"execution_count": 142,
"execution_count": 33,
"metadata": {},
"outputs": [
{
@ -1905,7 +1905,7 @@
"max 2.318580e+06 6.000000 234.200000 2021.000000"
]
},
"execution_count": 142,
"execution_count": 33,
"metadata": {},
"output_type": "execute_result"
}
@ -1916,7 +1916,7 @@
},
{
"cell_type": "code",
"execution_count": 143,
"execution_count": 34,
"metadata": {},
"outputs": [],
"source": [
@ -1925,7 +1925,7 @@
},
{
"cell_type": "code",
"execution_count": 144,
"execution_count": 35,
"metadata": {},
"outputs": [],
"source": [
@ -1934,7 +1934,7 @@
},
{
"cell_type": "code",
"execution_count": 145,
"execution_count": 36,
"metadata": {},
"outputs": [],
"source": [
@ -1943,7 +1943,7 @@
},
{
"cell_type": "code",
"execution_count": 146,
"execution_count": 37,
"metadata": {},
"outputs": [],
"source": [
@ -1952,7 +1952,7 @@
},
{
"cell_type": "code",
"execution_count": 147,
"execution_count": 38,
"metadata": {},
"outputs": [],
"source": [
@ -1962,7 +1962,7 @@
},
{
"cell_type": "code",
"execution_count": 148,
"execution_count": 39,
"metadata": {},
"outputs": [
{
@ -2092,7 +2092,7 @@
"[320 rows x 4 columns]"
]
},
"execution_count": 148,
"execution_count": 39,
"metadata": {},
"output_type": "execute_result"
}
@ -2110,7 +2110,7 @@
},
{
"cell_type": "code",
"execution_count": 149,
"execution_count": 40,
"metadata": {},
"outputs": [],
"source": [
@ -2119,7 +2119,7 @@
},
{
"cell_type": "code",
"execution_count": 150,
"execution_count": 41,
"metadata": {},
"outputs": [],
"source": [
@ -2128,7 +2128,7 @@
},
{
"cell_type": "code",
"execution_count": 151,
"execution_count": 42,
"metadata": {},
"outputs": [],
"source": [
@ -2138,7 +2138,7 @@
},
{
"cell_type": "code",
"execution_count": 152,
"execution_count": 43,
"metadata": {},
"outputs": [
{
@ -2241,7 +2241,7 @@
"max 6.000000e+06 11.000000 404.000000 2022.000000"
]
},
"execution_count": 152,
"execution_count": 43,
"metadata": {},
"output_type": "execute_result"
}
@ -2259,7 +2259,7 @@
},
{
"cell_type": "code",
"execution_count": 153,
"execution_count": 44,
"metadata": {},
"outputs": [],
"source": [
@ -2275,7 +2275,7 @@
},
{
"cell_type": "code",
"execution_count": 154,
"execution_count": 45,
"metadata": {},
"outputs": [],
"source": [
@ -2285,7 +2285,7 @@
},
{
"cell_type": "code",
"execution_count": 155,
"execution_count": 46,
"metadata": {},
"outputs": [],
"source": [
@ -2295,7 +2295,7 @@
},
{
"cell_type": "code",
"execution_count": 156,
"execution_count": 47,
"metadata": {},
"outputs": [],
"source": [
@ -2311,7 +2311,7 @@
},
{
"cell_type": "code",
"execution_count": 157,
"execution_count": 48,
"metadata": {},
"outputs": [],
"source": [
@ -2320,19 +2320,19 @@
},
{
"cell_type": "code",
"execution_count": 158,
"execution_count": 49,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<style>#sk-container-id-2 {color: black;}#sk-container-id-2 pre{padding: 0;}#sk-container-id-2 div.sk-toggleable {background-color: white;}#sk-container-id-2 label.sk-toggleable__label {cursor: pointer;display: block;width: 100%;margin-bottom: 0;padding: 0.3em;box-sizing: border-box;text-align: center;}#sk-container-id-2 label.sk-toggleable__label-arrow:before {content: \"▸\";float: left;margin-right: 0.25em;color: #696969;}#sk-container-id-2 label.sk-toggleable__label-arrow:hover:before {color: black;}#sk-container-id-2 div.sk-estimator:hover label.sk-toggleable__label-arrow:before {color: black;}#sk-container-id-2 div.sk-toggleable__content {max-height: 0;max-width: 0;overflow: hidden;text-align: left;background-color: #f0f8ff;}#sk-container-id-2 div.sk-toggleable__content pre {margin: 0.2em;color: black;border-radius: 0.25em;background-color: #f0f8ff;}#sk-container-id-2 input.sk-toggleable__control:checked~div.sk-toggleable__content {max-height: 200px;max-width: 100%;overflow: auto;}#sk-container-id-2 input.sk-toggleable__control:checked~label.sk-toggleable__label-arrow:before {content: \"▾\";}#sk-container-id-2 div.sk-estimator input.sk-toggleable__control:checked~label.sk-toggleable__label {background-color: #d4ebff;}#sk-container-id-2 div.sk-label input.sk-toggleable__control:checked~label.sk-toggleable__label {background-color: #d4ebff;}#sk-container-id-2 input.sk-hidden--visually {border: 0;clip: rect(1px 1px 1px 1px);clip: rect(1px, 1px, 1px, 1px);height: 1px;margin: -1px;overflow: hidden;padding: 0;position: absolute;width: 1px;}#sk-container-id-2 div.sk-estimator {font-family: monospace;background-color: #f0f8ff;border: 1px dotted black;border-radius: 0.25em;box-sizing: border-box;margin-bottom: 0.5em;}#sk-container-id-2 div.sk-estimator:hover {background-color: #d4ebff;}#sk-container-id-2 div.sk-parallel-item::after {content: \"\";width: 100%;border-bottom: 1px solid gray;flex-grow: 1;}#sk-container-id-2 div.sk-label:hover label.sk-toggleable__label {background-color: #d4ebff;}#sk-container-id-2 div.sk-serial::before {content: \"\";position: absolute;border-left: 1px solid gray;box-sizing: border-box;top: 0;bottom: 0;left: 50%;z-index: 0;}#sk-container-id-2 div.sk-serial {display: flex;flex-direction: column;align-items: center;background-color: white;padding-right: 0.2em;padding-left: 0.2em;position: relative;}#sk-container-id-2 div.sk-item {position: relative;z-index: 1;}#sk-container-id-2 div.sk-parallel {display: flex;align-items: stretch;justify-content: center;background-color: white;position: relative;}#sk-container-id-2 div.sk-item::before, #sk-container-id-2 div.sk-parallel-item::before {content: \"\";position: absolute;border-left: 1px solid gray;box-sizing: border-box;top: 0;bottom: 0;left: 50%;z-index: -1;}#sk-container-id-2 div.sk-parallel-item {display: flex;flex-direction: column;z-index: 1;position: relative;background-color: white;}#sk-container-id-2 div.sk-parallel-item:first-child::after {align-self: flex-end;width: 50%;}#sk-container-id-2 div.sk-parallel-item:last-child::after {align-self: flex-start;width: 50%;}#sk-container-id-2 div.sk-parallel-item:only-child::after {width: 0;}#sk-container-id-2 div.sk-dashed-wrapped {border: 1px dashed gray;margin: 0 0.4em 0.5em 0.4em;box-sizing: border-box;padding-bottom: 0.4em;background-color: white;}#sk-container-id-2 div.sk-label label {font-family: monospace;font-weight: bold;display: inline-block;line-height: 1.2em;}#sk-container-id-2 div.sk-label-container {text-align: center;}#sk-container-id-2 div.sk-container {/* jupyter's `normalize.less` sets `[hidden] { display: none; }` but bootstrap.min.css set `[hidden] { display: none !important; }` so we also need the `!important` here to be able to override the default hidden behavior on the sphinx rendered scikit-learn.org. See: https://github.com/scikit-learn/scikit-learn/issues/21755 */display: inline-block !important;position: relative;}#sk-container-id-2 div.sk-text-repr-fallback {display: none;}</style><div id=\"sk-container-id-2\" class=\"sk-top-container\"><div class=\"sk-text-repr-fallback\"><pre>LinearRegression()</pre><b>In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook. <br />On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.</b></div><div class=\"sk-container\" hidden><div class=\"sk-item\"><div class=\"sk-estimator sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-2\" type=\"checkbox\" checked><label for=\"sk-estimator-id-2\" class=\"sk-toggleable__label sk-toggleable__label-arrow\">LinearRegression</label><div class=\"sk-toggleable__content\"><pre>LinearRegression()</pre></div></div></div></div></div>"
"<style>#sk-container-id-1 {color: black;}#sk-container-id-1 pre{padding: 0;}#sk-container-id-1 div.sk-toggleable {background-color: white;}#sk-container-id-1 label.sk-toggleable__label {cursor: pointer;display: block;width: 100%;margin-bottom: 0;padding: 0.3em;box-sizing: border-box;text-align: center;}#sk-container-id-1 label.sk-toggleable__label-arrow:before {content: \"▸\";float: left;margin-right: 0.25em;color: #696969;}#sk-container-id-1 label.sk-toggleable__label-arrow:hover:before {color: black;}#sk-container-id-1 div.sk-estimator:hover label.sk-toggleable__label-arrow:before {color: black;}#sk-container-id-1 div.sk-toggleable__content {max-height: 0;max-width: 0;overflow: hidden;text-align: left;background-color: #f0f8ff;}#sk-container-id-1 div.sk-toggleable__content pre {margin: 0.2em;color: black;border-radius: 0.25em;background-color: #f0f8ff;}#sk-container-id-1 input.sk-toggleable__control:checked~div.sk-toggleable__content {max-height: 200px;max-width: 100%;overflow: auto;}#sk-container-id-1 input.sk-toggleable__control:checked~label.sk-toggleable__label-arrow:before {content: \"▾\";}#sk-container-id-1 div.sk-estimator input.sk-toggleable__control:checked~label.sk-toggleable__label {background-color: #d4ebff;}#sk-container-id-1 div.sk-label input.sk-toggleable__control:checked~label.sk-toggleable__label {background-color: #d4ebff;}#sk-container-id-1 input.sk-hidden--visually {border: 0;clip: rect(1px 1px 1px 1px);clip: rect(1px, 1px, 1px, 1px);height: 1px;margin: -1px;overflow: hidden;padding: 0;position: absolute;width: 1px;}#sk-container-id-1 div.sk-estimator {font-family: monospace;background-color: #f0f8ff;border: 1px dotted black;border-radius: 0.25em;box-sizing: border-box;margin-bottom: 0.5em;}#sk-container-id-1 div.sk-estimator:hover {background-color: #d4ebff;}#sk-container-id-1 div.sk-parallel-item::after {content: \"\";width: 100%;border-bottom: 1px solid gray;flex-grow: 1;}#sk-container-id-1 div.sk-label:hover label.sk-toggleable__label {background-color: #d4ebff;}#sk-container-id-1 div.sk-serial::before {content: \"\";position: absolute;border-left: 1px solid gray;box-sizing: border-box;top: 0;bottom: 0;left: 50%;z-index: 0;}#sk-container-id-1 div.sk-serial {display: flex;flex-direction: column;align-items: center;background-color: white;padding-right: 0.2em;padding-left: 0.2em;position: relative;}#sk-container-id-1 div.sk-item {position: relative;z-index: 1;}#sk-container-id-1 div.sk-parallel {display: flex;align-items: stretch;justify-content: center;background-color: white;position: relative;}#sk-container-id-1 div.sk-item::before, #sk-container-id-1 div.sk-parallel-item::before {content: \"\";position: absolute;border-left: 1px solid gray;box-sizing: border-box;top: 0;bottom: 0;left: 50%;z-index: -1;}#sk-container-id-1 div.sk-parallel-item {display: flex;flex-direction: column;z-index: 1;position: relative;background-color: white;}#sk-container-id-1 div.sk-parallel-item:first-child::after {align-self: flex-end;width: 50%;}#sk-container-id-1 div.sk-parallel-item:last-child::after {align-self: flex-start;width: 50%;}#sk-container-id-1 div.sk-parallel-item:only-child::after {width: 0;}#sk-container-id-1 div.sk-dashed-wrapped {border: 1px dashed gray;margin: 0 0.4em 0.5em 0.4em;box-sizing: border-box;padding-bottom: 0.4em;background-color: white;}#sk-container-id-1 div.sk-label label {font-family: monospace;font-weight: bold;display: inline-block;line-height: 1.2em;}#sk-container-id-1 div.sk-label-container {text-align: center;}#sk-container-id-1 div.sk-container {/* jupyter's `normalize.less` sets `[hidden] { display: none; }` but bootstrap.min.css set `[hidden] { display: none !important; }` so we also need the `!important` here to be able to override the default hidden behavior on the sphinx rendered scikit-learn.org. See: https://github.com/scikit-learn/scikit-learn/issues/21755 */display: inline-block !important;position: relative;}#sk-container-id-1 div.sk-text-repr-fallback {display: none;}</style><div id=\"sk-container-id-1\" class=\"sk-top-container\"><div class=\"sk-text-repr-fallback\"><pre>LinearRegression()</pre><b>In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook. <br />On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.</b></div><div class=\"sk-container\" hidden><div class=\"sk-item\"><div class=\"sk-estimator sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-1\" type=\"checkbox\" checked><label for=\"sk-estimator-id-1\" class=\"sk-toggleable__label sk-toggleable__label-arrow\">LinearRegression</label><div class=\"sk-toggleable__content\"><pre>LinearRegression()</pre></div></div></div></div></div>"
],
"text/plain": [
"LinearRegression()"
]
},
"execution_count": 158,
"execution_count": 49,
"metadata": {},
"output_type": "execute_result"
}
@ -2350,7 +2350,7 @@
},
{
"cell_type": "code",
"execution_count": 159,
"execution_count": 50,
"metadata": {},
"outputs": [],
"source": [
@ -2359,7 +2359,7 @@
},
{
"cell_type": "code",
"execution_count": 160,
"execution_count": 51,
"metadata": {},
"outputs": [],
"source": [
@ -2368,7 +2368,7 @@
},
{
"cell_type": "code",
"execution_count": 161,
"execution_count": 52,
"metadata": {},
"outputs": [
{
@ -2377,7 +2377,7 @@
"0.6264197107092035"
]
},
"execution_count": 161,
"execution_count": 52,
"metadata": {},
"output_type": "execute_result"
}
@ -2388,7 +2388,7 @@
},
{
"cell_type": "code",
"execution_count": 162,
"execution_count": 53,
"metadata": {},
"outputs": [
{
@ -2397,7 +2397,7 @@
"22930468691.882328"
]
},
"execution_count": 162,
"execution_count": 53,
"metadata": {},
"output_type": "execute_result"
}
@ -2408,7 +2408,7 @@
},
{
"cell_type": "code",
"execution_count": 163,
"execution_count": 54,
"metadata": {},
"outputs": [],
"source": [
@ -2417,7 +2417,7 @@
},
{
"cell_type": "code",
"execution_count": 164,
"execution_count": 55,
"metadata": {},
"outputs": [
{
@ -2426,7 +2426,7 @@
"0.5872189061243203"
]
},
"execution_count": 164,
"execution_count": 55,
"metadata": {},
"output_type": "execute_result"
}
@ -2437,7 +2437,7 @@
},
{
"cell_type": "code",
"execution_count": 165,
"execution_count": 56,
"metadata": {},
"outputs": [
{
@ -2446,7 +2446,7 @@
"12603444942.321444"
]
},
"execution_count": 165,
"execution_count": 56,
"metadata": {},
"output_type": "execute_result"
}
@ -2464,7 +2464,7 @@
},
{
"cell_type": "code",
"execution_count": 166,
"execution_count": 57,
"metadata": {},
"outputs": [],
"source": [
@ -2473,7 +2473,7 @@
},
{
"cell_type": "code",
"execution_count": 167,
"execution_count": 58,
"metadata": {},
"outputs": [
{
@ -2567,7 +2567,7 @@
"[292 rows x 1 columns]"
]
},
"execution_count": 167,
"execution_count": 58,
"metadata": {},
"output_type": "execute_result"
}
@ -2586,7 +2586,7 @@
},
{
"cell_type": "code",
"execution_count": 168,
"execution_count": 59,
"metadata": {},
"outputs": [],
"source": [
@ -2602,7 +2602,7 @@
},
{
"cell_type": "code",
"execution_count": 169,
"execution_count": 60,
"metadata": {},
"outputs": [
{
@ -2633,7 +2633,7 @@
},
{
"cell_type": "code",
"execution_count": 170,
"execution_count": 61,
"metadata": {},
"outputs": [
{
@ -2664,7 +2664,7 @@
},
{
"cell_type": "code",
"execution_count": 171,
"execution_count": 62,
"metadata": {},
"outputs": [
{
@ -2695,7 +2695,7 @@
},
{
"cell_type": "code",
"execution_count": 172,
"execution_count": 63,
"metadata": {},
"outputs": [
{
@ -2726,7 +2726,7 @@
},
{
"cell_type": "code",
"execution_count": 173,
"execution_count": 64,
"metadata": {},
"outputs": [
{
@ -2757,7 +2757,7 @@
},
{
"cell_type": "code",
"execution_count": 174,
"execution_count": 65,
"metadata": {},
"outputs": [
{
@ -2788,7 +2788,7 @@
},
{
"cell_type": "code",
"execution_count": 175,
"execution_count": 66,
"metadata": {},
"outputs": [],
"source": [
@ -2800,7 +2800,7 @@
},
{
"cell_type": "code",
"execution_count": 176,
"execution_count": 70,
"metadata": {},
"outputs": [
{
@ -2809,7 +2809,7 @@
"184531.94"
]
},
"execution_count": 176,
"execution_count": 70,
"metadata": {},
"output_type": "execute_result"
}
@ -2817,6 +2817,18 @@
"source": [
"cena_mieszkania(pokoje=2, metraz=25, rok=2000)"
]
},
{
"cell_type": "code",
"execution_count": 69,
"metadata": {},
"outputs": [],
"source": [
"# Zapisanie modelu do pliku\n",
"import pickle\n",
"filename = 'mieszkania_model'\n",
"pickle.dump(model, open(filename, 'wb'))\n"
]
}
],
"metadata": {

1
mieszkania5 Submodule

@ -0,0 +1 @@
Subproject commit 242c10da9f5aa9be2878f9ca555eb4d4833f4710

BIN
mieszkania_model Normal file

Binary file not shown.

0
model.py Normal file
View File