from transformers import AutoTokenizer, AutoModel

# Use the exact model name from the repository
model_name = "HooshvareLab/bert-base-parsbert-uncased" 

# This downloads and loads everything safely
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModel.from_pretrained(model_name)

# Use the model
inputs = tokenizer("هوش مصنوعی جالب است!", return_tensors="pt")
outputs = model(**inputs)
print(outputs.last_hidden_state.shape)
