Spaces:
Running
Running
feat: update
Browse files- 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 = './
|
17 |
DATASETS = sorted(
|
18 |
[
|
19 |
-
item.replace(".
|
20 |
-
if os.path.isfile(os.path.join(DATASETS_PATH, item)) and item.endswith('.
|
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 = './
|
48 |
DATASETS = sorted(
|
49 |
[
|
50 |
-
item.replace(".
|
51 |
-
if os.path.isfile(os.path.join(DATASETS_PATH, item)) and item.endswith('.
|
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 |
|