tebakaja commited on
Commit
200758a
·
1 Parent(s): 85332cd

feat: update

Browse files
Files changed (1) hide show
  1. restful/controllers.py +6 -6
restful/controllers.py CHANGED
@@ -13,11 +13,11 @@ class cryptocurrency_controller:
13
  # Cryptocurrency List
14
  async def crypto_list(self) -> JSONResponse:
15
  try:
16
- DATASETS_PATH = './datasets'
17
  DATASETS = sorted(
18
  [
19
- item.replace(".csv", "") for item in os.listdir(DATASETS_PATH)
20
- if os.path.isfile(os.path.join(DATASETS_PATH, item)) and item.endswith('.csv')
21
  ]
22
  )
23
 
@@ -44,11 +44,11 @@ class cryptocurrency_controller:
44
  # Cryptocurrency Controller
45
  async def prediction(self, payload: CryptocurrencyPredictionSchema) -> JSONResponse:
46
  try:
47
- DATASETS_PATH = './datasets'
48
  DATASETS = sorted(
49
  [
50
- item.replace(".csv", "") for item in os.listdir(DATASETS_PATH)
51
- if os.path.isfile(os.path.join(DATASETS_PATH, item)) and item.endswith('.csv')
52
  ]
53
  )
54
 
 
13
  # Cryptocurrency List
14
  async def crypto_list(self) -> JSONResponse:
15
  try:
16
+ DATASETS_PATH = './models'
17
  DATASETS = sorted(
18
  [
19
+ item.replace(".onnx", "") for item in os.listdir(DATASETS_PATH)
20
+ if os.path.isfile(os.path.join(DATASETS_PATH, item)) and item.endswith('.onnx')
21
  ]
22
  )
23
 
 
44
  # Cryptocurrency Controller
45
  async def prediction(self, payload: CryptocurrencyPredictionSchema) -> JSONResponse:
46
  try:
47
+ DATASETS_PATH = './models'
48
  DATASETS = sorted(
49
  [
50
+ item.replace(".onnx", "") for item in os.listdir(DATASETS_PATH)
51
+ if os.path.isfile(os.path.join(DATASETS_PATH, item)) and item.endswith('.onnx')
52
  ]
53
  )
54