Update app.py
Browse files
app.py
CHANGED
@@ -12,21 +12,19 @@ with open("columns.json", "r") as f:
|
|
12 |
|
13 |
# Define the location and property type mappings
|
14 |
location_mapping = {
|
15 |
-
'
|
16 |
-
'
|
17 |
-
'
|
18 |
-
'
|
19 |
-
'
|
20 |
-
'
|
21 |
-
'
|
22 |
-
'nyarutarama': 8
|
23 |
}
|
24 |
|
25 |
property_type_mapping = {
|
26 |
-
'
|
27 |
-
'
|
28 |
-
'
|
29 |
-
'villa': 4
|
30 |
}
|
31 |
|
32 |
def transform_data(size_sqm, number_of_bedrooms, number_of_bathrooms, number_of_floors, parking_space, location, property_type):
|
|
|
12 |
|
13 |
# Define the location and property type mappings
|
14 |
location_mapping = {
|
15 |
+
'kacyiru': 1,
|
16 |
+
'kanombe': 2,
|
17 |
+
'kibagabaga': 3,
|
18 |
+
'kicukiro': 4,
|
19 |
+
'kimironko': 5,
|
20 |
+
'nyamirambo': 6,
|
21 |
+
'nyarutarama': 7
|
|
|
22 |
}
|
23 |
|
24 |
property_type_mapping = {
|
25 |
+
'bungalow': 1,
|
26 |
+
'house': 2,
|
27 |
+
'villa': 3
|
|
|
28 |
}
|
29 |
|
30 |
def transform_data(size_sqm, number_of_bedrooms, number_of_bathrooms, number_of_floors, parking_space, location, property_type):
|