Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -93,20 +93,20 @@ def train_stock_model(stock_symbol, start_date, end_date, feature_range=(10, 100
|
|
| 93 |
weight_decay=0.01,
|
| 94 |
lr_scheduler_type="linear",
|
| 95 |
seed=3407,
|
| 96 |
-
output_dir=f"StockLlama-LoRA-{stock_symbol}",
|
| 97 |
),
|
| 98 |
)
|
| 99 |
|
| 100 |
trainer.train()
|
| 101 |
|
| 102 |
model = model.merge_and_unload()
|
| 103 |
-
model.push_to_hub(f"Q-bert/StockLlama-tuned-{stock_symbol}")
|
| 104 |
scaler_path = "scaler.joblib"
|
| 105 |
joblib.dump(scaler, scaler_path)
|
| 106 |
upload_file(
|
| 107 |
path_or_fileobj=scaler_path,
|
| 108 |
path_in_repo=f"scalers/{scaler_path}",
|
| 109 |
-
repo_id=f"Q-bert/StockLlama-tuned-{stock_symbol}"
|
| 110 |
)
|
| 111 |
|
| 112 |
@spaces.GPU
|
|
|
|
| 93 |
weight_decay=0.01,
|
| 94 |
lr_scheduler_type="linear",
|
| 95 |
seed=3407,
|
| 96 |
+
output_dir=f"StockLlama-LoRA-{stock_symbol}-{stock_symbol}-{start_date}_{end_date}",
|
| 97 |
),
|
| 98 |
)
|
| 99 |
|
| 100 |
trainer.train()
|
| 101 |
|
| 102 |
model = model.merge_and_unload()
|
| 103 |
+
model.push_to_hub(f"Q-bert/StockLlama-tuned-{stock_symbol}-{stock_symbol}-{start_date}_{end_date}")
|
| 104 |
scaler_path = "scaler.joblib"
|
| 105 |
joblib.dump(scaler, scaler_path)
|
| 106 |
upload_file(
|
| 107 |
path_or_fileobj=scaler_path,
|
| 108 |
path_in_repo=f"scalers/{scaler_path}",
|
| 109 |
+
repo_id=f"Q-bert/StockLlama-tuned-{stock_symbol}-{stock_symbol}-{start_date}_{end_date}"
|
| 110 |
)
|
| 111 |
|
| 112 |
@spaces.GPU
|