First of all, when I import a library that I created (including the torch imports and architecture), I start getting the following error: "AttributeError: Oanda". I have seen that other people also experienced this error due to some imports:

https://www.quantconnect.com/forum/discussion/4742/addforex-market-oanda/p1/comment-13833

Apart from that, I would like to know how I can download and load an external PyTorch model. I have downloaded the file with Python requests but wasn't able to load the model with the same name that I have utilized for downloading. Then, I have tried self.Download, which is existing in some examples, but getting "File name too long" error while trying to load that into a PyTorch model. I guess that the variable to which I assigned self.Download output doesn't contain the filename. Hence, my question is how I can download an external file from Dropbox and then use that for loading to a PyTorch model as follows:

        file = self.Download("https://www.dropbox.com/.../best_model.pt?dl=0")
        model.load_state_dict(torch.load(file))
        model.eval()