About model storage in spaces

If you are using a model you created yourself or a very old model, you will need to use HfApi to download it, but in that case, you can download it when you need it by simply writing it as shown below.

from transformers import AutoTokenizer, AutoModelForSequenceClassification

model = AutoModelForSequenceClassification.from_pretrained("ProsusAI/finbert") # this line downloads model weight
tokenizer = AutoTokenizer.from_pretrained("ProsusAI/finbert") # this line downloads tokenizer configuration

or

from transformers import pipeline
pipe = pipeline("text-classification", model="ProsusAI/finbert") # this line downloads whole model weights and settings