Spaces:
Build error
Build error
Update utils.py
Browse files
utils.py
CHANGED
|
@@ -13,13 +13,13 @@ from statsmodels.tsa.arima.model import ARIMA
|
|
| 13 |
import tensorflow as tf
|
| 14 |
import utils
|
| 15 |
|
| 16 |
-
|
| 17 |
-
def predict_medicine_demand(monthly_data,location: str, year: int, month: int):
|
| 18 |
results = []
|
| 19 |
products=('Medicine_4', 'Medicine_10', 'Medicine_5', 'Medicine_7','Medicine_3', 'Medicine_2', 'Medicine_8', 'Medicine_1','Medicine_6', 'Medicine_9')
|
| 20 |
for product in products:
|
| 21 |
try:
|
| 22 |
-
|
|
|
|
| 23 |
# Get last 3 values from the data
|
| 24 |
ts_df = monthly_data[(monthly_data['product'] == product) & (monthly_data['location'] == location)].copy()
|
| 25 |
ts_df.set_index('date', inplace=True)
|
|
|
|
| 13 |
import tensorflow as tf
|
| 14 |
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')
|
| 22 |
+
|
| 23 |
# Get last 3 values from the data
|
| 24 |
ts_df = monthly_data[(monthly_data['product'] == product) & (monthly_data['location'] == location)].copy()
|
| 25 |
ts_df.set_index('date', inplace=True)
|