diff --git a/requirements-dev.txt b/requirements-dev.txt index ac0e7e4..25bf00f 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,35 +1,44 @@ -blinker==1.6.2 -click==8.1.3 -dash==2.9.3 +ansi2html==1.8.0 +blinker==1.6.3 +certifi==2023.7.22 +charset-normalizer==3.3.1 +click==8.1.7 +dash==2.14.1 dash-core-components==2.0.0 dash-html-components==2.0.0 dash-table==5.0.0 et-xmlfile==1.1.0 -exceptiongroup==1.1.1 -flake8==6.0.0 -Flask==2.3.2 +flake8==6.1.0 +Flask==3.0.0 +idna==3.4 +importlib-metadata==6.8.0 iniconfig==2.0.0 itsdangerous==2.1.2 Jinja2==3.1.2 -MarkupSafe==2.1.2 +MarkupSafe==2.1.3 mccabe==0.7.0 -numpy==1.24.3 +nest-asyncio==1.5.8 +numpy==1.26.1 openpyxl==3.1.2 -packaging==23.1 -pandas==2.0.1 +packaging==23.2 +pandas==2.1.2 patsy==0.5.3 -plotly==5.14.1 -pluggy==1.0.0 -pycodestyle==2.10.0 -pyflakes==3.0.1 -pytest==7.3.1 +plotly==5.18.0 +pluggy==1.3.0 +pycodestyle==2.11.1 +pyflakes==3.1.0 +pytest==7.4.3 python-dateutil==2.8.2 -pytz==2023.3 -scipy==1.10.1 +pytz==2023.3.post1 +requests==2.31.0 +retrying==1.3.4 +scipy==1.11.3 six==1.16.0 -statsmodels==0.13.5 -tenacity==8.2.2 -tomli==2.0.1 +statsmodels==0.14.0 +tenacity==8.2.3 +typing_extensions==4.8.0 tzdata==2023.3 +urllib3==2.0.7 waitress==2.1.2 -Werkzeug==2.3.3 +Werkzeug==3.0.1 +zipp==3.17.0 diff --git a/requirements.txt b/requirements.txt index 8369b1f..5f2b586 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,26 +1,37 @@ -blinker==1.6.2 -click==8.1.3 -dash==2.9.3 +ansi2html==1.8.0 +blinker==1.6.3 +certifi==2023.7.22 +charset-normalizer==3.3.1 +click==8.1.7 +dash==2.14.1 dash-core-components==2.0.0 dash-html-components==2.0.0 dash-table==5.0.0 et-xmlfile==1.1.0 -Flask==2.3.2 +Flask==3.0.0 +idna==3.4 +importlib-metadata==6.8.0 itsdangerous==2.1.2 Jinja2==3.1.2 -MarkupSafe==2.1.2 -numpy==1.24.3 +MarkupSafe==2.1.3 +nest-asyncio==1.5.8 +numpy==1.26.1 openpyxl==3.1.2 -packaging==23.1 -pandas==2.0.1 +packaging==23.2 +pandas==2.1.2 patsy==0.5.3 -plotly==5.14.1 +plotly==5.18.0 python-dateutil==2.8.2 -pytz==2023.3 -scipy==1.10.1 +pytz==2023.3.post1 +requests==2.31.0 +retrying==1.3.4 +scipy==1.11.3 six==1.16.0 -statsmodels==0.13.5 -tenacity==8.2.2 +statsmodels==0.14.0 +tenacity==8.2.3 +typing_extensions==4.8.0 tzdata==2023.3 +urllib3==2.0.7 waitress==2.1.2 -Werkzeug==2.3.3 +Werkzeug==3.0.1 +zipp==3.17.0 diff --git a/ts_app/components/modelling.py b/ts_app/components/modelling.py index 1800b56..56a2291 100644 --- a/ts_app/components/modelling.py +++ b/ts_app/components/modelling.py @@ -1,3 +1,4 @@ +from io import StringIO from typing import Optional, Tuple import pandas as pd @@ -174,10 +175,14 @@ def model_and_predict( if input_source == "/upload" and upload is not None: filename = upload["filename"] - data = pd.read_json(upload["data"], orient="index", typ="series") + data = pd.read_json( + StringIO(upload["data"]), orient="index", typ="series" + ) elif input_source == "/sample" and sample is not None: filename = sample["filename"] - data = pd.read_json(sample["data"], orient="index", typ="series") + data = pd.read_json( + StringIO(sample["data"]), orient="index", typ="series" + ) else: filename = "a random sample" data = create_arma_sample()