Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -22,24 +22,24 @@ def main():
|
|
| 22 |
if clicked:
|
| 23 |
# Prepare input data for both models
|
| 24 |
data_acc = pd.DataFrame({
|
| 25 |
-
'duration_(days)':
|
| 26 |
-
'accommodation_type_Airbnb':
|
| 27 |
-
'accommodation_type_Guesthouse':
|
| 28 |
-
'accommodation_type_Hostel':
|
| 29 |
-
'accommodation_type_Hotel':
|
| 30 |
-
'accommodation_type_Resort':
|
| 31 |
-
'accommodation_type_Vacation rental':
|
| 32 |
-
'accommodation_type_Villa':
|
| 33 |
})
|
| 34 |
|
| 35 |
data_tp = pd.DataFrame({
|
| 36 |
-
'duration_(days)':
|
| 37 |
-
'transportation_type_Bus':
|
| 38 |
-
'transportation_type_Car':
|
| 39 |
-
'transportation_type_Ferry':
|
| 40 |
-
'transportation_type_Flight':
|
| 41 |
-
'transportation_type_Subway':
|
| 42 |
-
'transportation_type_Train':
|
| 43 |
})
|
| 44 |
|
| 45 |
# Set the selected transportation type to 1
|
|
|
|
| 22 |
if clicked:
|
| 23 |
# Prepare input data for both models
|
| 24 |
data_acc = pd.DataFrame({
|
| 25 |
+
'duration_(days)': day,
|
| 26 |
+
'accommodation_type_Airbnb': 0,
|
| 27 |
+
'accommodation_type_Guesthouse': 0,
|
| 28 |
+
'accommodation_type_Hostel': 0,
|
| 29 |
+
'accommodation_type_Hotel': 0,
|
| 30 |
+
'accommodation_type_Resort': 0,
|
| 31 |
+
'accommodation_type_Vacation rental': 0,
|
| 32 |
+
'accommodation_type_Villa': 0
|
| 33 |
})
|
| 34 |
|
| 35 |
data_tp = pd.DataFrame({
|
| 36 |
+
'duration_(days)': day,
|
| 37 |
+
'transportation_type_Bus': 0,
|
| 38 |
+
'transportation_type_Car': 0,
|
| 39 |
+
'transportation_type_Ferry': 0,
|
| 40 |
+
'transportation_type_Flight': 0,
|
| 41 |
+
'transportation_type_Subway': 0,
|
| 42 |
+
'transportation_type_Train': 0
|
| 43 |
})
|
| 44 |
|
| 45 |
# Set the selected transportation type to 1
|