Spaces:
Runtime error
Runtime error
amitke commited on
Commit ·
b0d8e39
1
Parent(s): d56edb9
- .gitignore +1 -0
- inference.py +1 -0
- models.py +3 -0
- testing.py +1 -0
.gitignore
CHANGED
|
@@ -1 +1,2 @@
|
|
| 1 |
__pycache__/
|
|
|
|
|
|
| 1 |
__pycache__/
|
| 2 |
+
artifacts/
|
inference.py
CHANGED
|
@@ -6,6 +6,7 @@ import torch
|
|
| 6 |
|
| 7 |
from models import StockLSTM
|
| 8 |
|
|
|
|
| 9 |
ARTIFACTS_DIR = "artifacts"
|
| 10 |
|
| 11 |
def _paths(symbol: str):
|
|
|
|
| 6 |
|
| 7 |
from models import StockLSTM
|
| 8 |
|
| 9 |
+
os.environ["CUDA_VISIBLE_DEVICES"] = ""
|
| 10 |
ARTIFACTS_DIR = "artifacts"
|
| 11 |
|
| 12 |
def _paths(symbol: str):
|
models.py
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
|
|
| 1 |
import torch
|
| 2 |
import torch.nn as nn
|
| 3 |
|
|
|
|
|
|
|
| 4 |
class StockLSTM(nn.Module):
|
| 5 |
def __init__(self, input_dim=1, hidden_dim=64, num_layers=2, dropout=0.2):
|
| 6 |
super().__init__()
|
|
|
|
| 1 |
+
import os
|
| 2 |
import torch
|
| 3 |
import torch.nn as nn
|
| 4 |
|
| 5 |
+
os.environ["CUDA_VISIBLE_DEVICES"] = ""
|
| 6 |
+
|
| 7 |
class StockLSTM(nn.Module):
|
| 8 |
def __init__(self, input_dim=1, hidden_dim=64, num_layers=2, dropout=0.2):
|
| 9 |
super().__init__()
|
testing.py
CHANGED
|
@@ -7,6 +7,7 @@ import torch
|
|
| 7 |
|
| 8 |
from models import StockLSTM
|
| 9 |
|
|
|
|
| 10 |
ARTIFACTS_DIR = "artifacts"
|
| 11 |
|
| 12 |
@torch.no_grad()
|
|
|
|
| 7 |
|
| 8 |
from models import StockLSTM
|
| 9 |
|
| 10 |
+
os.environ["CUDA_VISIBLE_DEVICES"] = ""
|
| 11 |
ARTIFACTS_DIR = "artifacts"
|
| 12 |
|
| 13 |
@torch.no_grad()
|