Spaces:
Build error
Build error
Update utils.py
Browse files
utils.py
CHANGED
|
@@ -15,7 +15,7 @@ import utils
|
|
| 15 |
|
| 16 |
def predict_medicine_demand(location: str, year: int, month: int):
|
| 17 |
results = []
|
| 18 |
-
products=
|
| 19 |
for product in products:
|
| 20 |
try:
|
| 21 |
monthly_data=pd.read_csv('monthly_data.csv')
|
|
@@ -25,8 +25,7 @@ def predict_medicine_demand(location: str, year: int, month: int):
|
|
| 25 |
ts_df.set_index('date', inplace=True)
|
| 26 |
ts_df = ts_df.sort_index()
|
| 27 |
ts = ts_df['quantity']
|
| 28 |
-
|
| 29 |
-
continue
|
| 30 |
|
| 31 |
# Load ARIMA model
|
| 32 |
arima_model = joblib.load(f"models/arima_{product}_{location}.pkl")
|
|
|
|
| 15 |
|
| 16 |
def predict_medicine_demand(location: str, year: int, month: int):
|
| 17 |
results = []
|
| 18 |
+
products=('Medicine_4', 'Medicine_10', 'Medicine_5', 'Medicine_7','Medicine_3', 'Medicine_2', 'Medicine_8', 'Medicine_1','Medicine_6', 'Medicine_9')
|
| 19 |
for product in products:
|
| 20 |
try:
|
| 21 |
monthly_data=pd.read_csv('monthly_data.csv')
|
|
|
|
| 25 |
ts_df.set_index('date', inplace=True)
|
| 26 |
ts_df = ts_df.sort_index()
|
| 27 |
ts = ts_df['quantity']
|
| 28 |
+
|
|
|
|
| 29 |
|
| 30 |
# Load ARIMA model
|
| 31 |
arima_model = joblib.load(f"models/arima_{product}_{location}.pkl")
|