Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -4,11 +4,12 @@ import joblib
|
|
4 |
import numpy as np
|
5 |
from models.neural_network.inference import load_model_and_preprocessor
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
|
|
|
|
|
10 |
|
11 |
-
xgboost_model = joblib.load('/Users/ashishpoudel/Downloads/AircraftFuelPrediction-main/saved_models/xgboost_model.joblib')
|
12 |
|
13 |
# Load the unique aircraft data
|
14 |
aircraft_data = pd.read_csv('/Users/ashishpoudel/Downloads/AircraftFuelPrediction-main/datasets/aircraft_data.csv').drop_duplicates(subset='model')
|
|
|
4 |
import numpy as np
|
5 |
from models.neural_network.inference import load_model_and_preprocessor
|
6 |
|
7 |
+
from huggingface_hub import hf_hub_download
|
8 |
+
|
9 |
+
# Download the model from Hugging Face hub
|
10 |
+
model_filename = hf_hub_download(repo_id="poudel/AircraftFuelPrediction", filename='nn_model.keras','nn_preprocessor.pkl
|
11 |
+
')
|
12 |
|
|
|
13 |
|
14 |
# Load the unique aircraft data
|
15 |
aircraft_data = pd.read_csv('/Users/ashishpoudel/Downloads/AircraftFuelPrediction-main/datasets/aircraft_data.csv').drop_duplicates(subset='model')
|