File size: 556 Bytes
a3cd121
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

import torch
from huggingface_hub import hf_hub_download

# Download the model from Hugging Face
model_path = hf_hub_download(repo_id="SatyamSinghal/financial-ttm", filename="financial_ttm_model.pth")

# Load model data
model_data = torch.load(model_path)

# Extract model configuration
config = model_data['config']
print(f"Model configuration: {config}")

# To reconstruct the model, you would use:
# from models import FinancialTTM
# model = FinancialTTM(**config)
# model.load_state_dict(model_data['state_dict'])

print("Model loaded successfully!")