ARBAJSSHAIKH commited on
Commit
afbff3e
·
verified ·
1 Parent(s): 9a6a4ec

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +2 -3
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=['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,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
- if len(ts) < 6:
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")