jsebdev commited on
Commit
2492ec9
·
1 Parent(s): fb3a8a6

make demo version with no model

Browse files
Files changed (3) hide show
  1. app.py +2 -1
  2. requirements.txt +19 -69
  3. utils.py +4 -8
app.py CHANGED
@@ -45,6 +45,7 @@ with gr.Blocks() as demo:
45
  min_text,
46
  next_close_text
47
  ]
48
- predict_button.click(lambda: predict(data), outputs=outputs)
 
49
 
50
  demo.launch(debug=True)
 
45
  min_text,
46
  next_close_text
47
  ]
48
+ # predict_button.click(lambda: predict(data), outputs=outputs)
49
+ predict_button.click(lambda: predict_mock(data), outputs=outputs)
50
 
51
  demo.launch(debug=True)
requirements.txt CHANGED
@@ -2,92 +2,56 @@ aiofiles==23.1.0
2
  aiohttp==3.8.4
3
  aiosignal==1.3.1
4
  altair==4.2.2
5
- altgraph @ file:///System/Volumes/Data/SWE/Apps/DT/BuildRoots/BuildRoot2/ActiveBuildRoot/Library/Caches/com.apple.xbs/Sources/python3/python3-124/altgraph-0.17.2-py2.py3-none-any.whl
6
  anyio==3.6.2
7
  appdirs==1.4.4
8
- asgiref==3.6.0
9
  async-timeout==4.0.2
10
  attrs==22.2.0
11
- autopep8==2.0.1
12
- aws-cdk-lib==2.66.1
13
- aws-cdk.asset-awscli-v1==2.2.83
14
- aws-cdk.asset-kubectl-v20==2.1.1
15
- aws-cdk.asset-node-proxy-agent-v5==2.0.69
16
  beautifulsoup4==4.12.2
17
- bleach==6.0.0
18
- blessed==1.20.0
19
- boto3==1.26.74
20
- botocore==1.29.74
21
- cattrs==22.2.0
22
  certifi==2022.12.7
23
  cffi==1.15.1
24
- charset-normalizer==3.0.1
25
  click==8.1.3
26
- codefind==0.1.3
27
- constructs==10.1.262
28
  contourpy==1.0.7
29
  cryptography==40.0.1
30
  cycler==0.11.0
31
- distlib==0.3.6
32
- Django==4.1.7
33
- docutils==0.19
34
  entrypoints==0.4
35
- exceptiongroup==1.1.0
36
  fastapi==0.95.0
37
  ffmpy==0.3.0
38
- filelock==3.9.0
39
  fonttools==4.39.3
40
  frozendict==2.3.7
41
  frozenlist==1.3.3
42
  fsspec==2023.4.0
43
- future @ file:///System/Volumes/Data/SWE/Apps/DT/BuildRoots/BuildRoot2/ActiveBuildRoot/Library/Caches/com.apple.xbs/Sources/python3/python3-124/future-0.18.2-py3-none-any.whl
44
- gradio==3.24.1
45
- gradio_client==0.0.8
46
  h11==0.14.0
47
  html5lib==1.1
48
- httpcore==0.16.3
49
- httpx==0.23.3
50
  huggingface-hub==0.13.4
51
  idna==3.4
52
- importlib-metadata==6.0.0
53
  importlib-resources==5.12.0
54
- importnb==2023.1.7
55
- ipynb==0.5.1
56
- jaraco.classes==3.2.3
57
  Jinja2==3.1.2
58
- jmespath==1.0.1
59
- jsii==1.76.0
60
  jsonschema==4.17.3
61
- jurigged==0.5.5
62
- keyring==23.13.1
63
  kiwisolver==1.4.4
64
- linkify-it-py==1.0.3
65
  lxml==4.9.2
66
- macholib @ file:///System/Volumes/Data/SWE/Apps/DT/BuildRoots/BuildRoot2/ActiveBuildRoot/Library/Caches/com.apple.xbs/Sources/python3/python3-124/macholib-1.15.2-py2.py3-none-any.whl
67
- markdown-it-py==2.1.0
68
  MarkupSafe==2.1.2
69
  matplotlib==3.7.1
70
  mdit-py-plugins==0.3.3
71
  mdurl==0.1.2
72
- more-itertools==9.0.0
73
  multidict==6.0.4
74
  multitasking==0.0.11
75
- numpy==1.24.1
76
- orjson==3.8.9
77
- ovld==0.3.2
78
  packaging==23.0
79
- pandas==1.5.3
80
  pandas-datareader==0.10.0
81
- Pillow==9.4.0
82
- pkginfo==1.9.6
83
- platformdirs==3.1.0
84
- psutil==5.9.4
85
- publication==0.0.3
86
- pycodestyle==2.10.0
87
  pycparser==2.21
88
- pydantic==1.10.4
89
  pydub==0.25.1
90
- Pygments==2.14.0
91
  pyparsing==3.0.9
92
  pyrsistent==0.19.3
93
  python-dateutil==2.8.2
@@ -95,35 +59,21 @@ python-dotenv==1.0.0
95
  python-multipart==0.0.6
96
  pytz==2023.3
97
  PyYAML==6.0
98
- readme-renderer==37.3
99
- regex==2022.10.31
100
  requests==2.28.2
101
- requests-toolbelt==0.10.1
102
- rfc3986==1.5.0
103
- rich==13.3.1
104
- s3transfer==0.6.0
105
  semantic-version==2.10.0
106
- six @ file:///System/Volumes/Data/SWE/Apps/DT/BuildRoots/BuildRoot2/ActiveBuildRoot/Library/Caches/com.apple.xbs/Sources/python3/python3-124/six-1.15.0-py2.py3-none-any.whl
107
  sniffio==1.3.0
108
  soupsieve==2.4
109
- sqlparse==0.4.3
110
  starlette==0.26.1
111
- tokenizers==0.13.2
112
- tomli==2.0.1
113
  toolz==0.12.0
114
- torch==1.13.1
115
- tqdm==4.64.1
116
- twine==4.0.2
117
- typeguard==2.13.3
118
- typing_extensions==4.4.0
119
  uc-micro-py==1.0.1
120
- urllib3==1.26.14
121
  uvicorn==0.21.1
122
- virtualenv==20.20.0
123
- watchdog==3.0.0
124
- wcwidth==0.2.6
125
  webencodings==0.5.1
126
  websockets==11.0.1
127
  yarl==1.8.2
128
  yfinance==0.2.17
129
- zipp==3.13.0
 
2
  aiohttp==3.8.4
3
  aiosignal==1.3.1
4
  altair==4.2.2
 
5
  anyio==3.6.2
6
  appdirs==1.4.4
 
7
  async-timeout==4.0.2
8
  attrs==22.2.0
 
 
 
 
 
9
  beautifulsoup4==4.12.2
 
 
 
 
 
10
  certifi==2022.12.7
11
  cffi==1.15.1
12
+ charset-normalizer==3.1.0
13
  click==8.1.3
 
 
14
  contourpy==1.0.7
15
  cryptography==40.0.1
16
  cycler==0.11.0
 
 
 
17
  entrypoints==0.4
 
18
  fastapi==0.95.0
19
  ffmpy==0.3.0
20
+ filelock==3.11.0
21
  fonttools==4.39.3
22
  frozendict==2.3.7
23
  frozenlist==1.3.3
24
  fsspec==2023.4.0
25
+ gradio==3.25.0
26
+ gradio_client==0.0.10
 
27
  h11==0.14.0
28
  html5lib==1.1
29
+ httpcore==0.17.0
30
+ httpx==0.24.0
31
  huggingface-hub==0.13.4
32
  idna==3.4
 
33
  importlib-resources==5.12.0
 
 
 
34
  Jinja2==3.1.2
 
 
35
  jsonschema==4.17.3
 
 
36
  kiwisolver==1.4.4
37
+ linkify-it-py==2.0.0
38
  lxml==4.9.2
39
+ markdown-it-py==2.2.0
 
40
  MarkupSafe==2.1.2
41
  matplotlib==3.7.1
42
  mdit-py-plugins==0.3.3
43
  mdurl==0.1.2
 
44
  multidict==6.0.4
45
  multitasking==0.0.11
46
+ numpy==1.24.2
47
+ orjson==3.8.10
 
48
  packaging==23.0
49
+ pandas==2.0.0
50
  pandas-datareader==0.10.0
51
+ Pillow==9.5.0
 
 
 
 
 
52
  pycparser==2.21
53
+ pydantic==1.10.7
54
  pydub==0.25.1
 
55
  pyparsing==3.0.9
56
  pyrsistent==0.19.3
57
  python-dateutil==2.8.2
 
59
  python-multipart==0.0.6
60
  pytz==2023.3
61
  PyYAML==6.0
 
 
62
  requests==2.28.2
 
 
 
 
63
  semantic-version==2.10.0
64
+ six==1.16.0
65
  sniffio==1.3.0
66
  soupsieve==2.4
 
67
  starlette==0.26.1
 
 
68
  toolz==0.12.0
69
+ tqdm==4.65.0
70
+ typing_extensions==4.5.0
71
+ tzdata==2023.3
 
 
72
  uc-micro-py==1.0.1
73
+ urllib3==1.26.15
74
  uvicorn==0.21.1
 
 
 
75
  webencodings==0.5.1
76
  websockets==11.0.1
77
  yarl==1.8.2
78
  yfinance==0.2.17
79
+ zipp==3.15.0
utils.py CHANGED
@@ -1,17 +1,10 @@
1
  import numpy as np
2
- # import matplotlib.pyplot as plt
3
  import pandas as pd
4
  import pandas_datareader as web
5
  import datetime as dt
6
  import yfinance as yfin
7
- # import tensorflow as tf
8
  import os
9
- # import re
10
 
11
- from huggingface_hub import from_pretrained_keras
12
- # from sklearn.preprocessing import MinMaxScaler
13
- # from tensorflow.keras.models import Sequential
14
- # from tensorflow.keras.layers import Dense, Dropout, LSTM
15
 
16
 
17
  def get_data(ticker='AAPL', start=None, end=None):
@@ -94,4 +87,7 @@ def predict(data):
94
  print(next_candle)
95
  jump = next_candle[0]
96
  next_candle = next_candle + last_close
97
- return (jump, next_candle[0], next_candle[1], next_candle[2], next_candle[3])
 
 
 
 
1
  import numpy as np
 
2
  import pandas as pd
3
  import pandas_datareader as web
4
  import datetime as dt
5
  import yfinance as yfin
 
6
  import os
 
7
 
 
 
 
 
8
 
9
 
10
  def get_data(ticker='AAPL', start=None, end=None):
 
87
  print(next_candle)
88
  jump = next_candle[0]
89
  next_candle = next_candle + last_close
90
+ return (jump, next_candle[0], next_candle[1], next_candle[2], next_candle[3])
91
+
92
+ def predict_mock(data):
93
+ return (0,1,2,3,4)