Update app.py
Browse files
app.py
CHANGED
@@ -7,6 +7,15 @@ import tensorflow as tf
|
|
7 |
# Load the trained model
|
8 |
model = tf.keras.models.load_model("saaara/real_estate_price_prediction/mon_modele.bin")
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
# Load the original dataset to get unique categories for 'secteur' and 'city'
|
11 |
original_df = pd.read_excel("saaara/real_estate_price_prediction/Moroccan Real Estate Price Clean Dataset .xlsx") # Replace with your dataset path
|
12 |
|
|
|
7 |
# Load the trained model
|
8 |
model = tf.keras.models.load_model("saaara/real_estate_price_prediction/mon_modele.bin")
|
9 |
|
10 |
+
import os
|
11 |
+
|
12 |
+
file_path = "saaara/real_estate_price_prediction/mon_modele.bin"
|
13 |
+
if os.path.exists(file_path):
|
14 |
+
model = tf.keras.models.load_model(file_path)
|
15 |
+
else:
|
16 |
+
print(f"Error: File '{file_path}' not found.")
|
17 |
+
|
18 |
+
|
19 |
# Load the original dataset to get unique categories for 'secteur' and 'city'
|
20 |
original_df = pd.read_excel("saaara/real_estate_price_prediction/Moroccan Real Estate Price Clean Dataset .xlsx") # Replace with your dataset path
|
21 |
|