Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

from transformers import AutoTokenizer, AutoModel # دانلود مدل و توکنایزر model_name = "HooshvareLab/bert-fa-base-uncased" tokenizer = AutoTokenizer.from_pretrained(model_name) model = AutoModel.from_pretrained(model_name) # نمونه‌ای از متن text = "ما در هوشواره معتقدیم با انتقال صحیح دانش و آگاهی، همه افراد می‌توانند از ابزارهای هوشمند استفاده کنند. شعار ما هوش مصنوعی برای همه است." # توکنایز کردن متن inputs = tokenizer(text, return_tensors="pt") # استخراج ویژگی‌ها از مدل outputs = model(**inputs) #33

Open
alirezaaddeli opened this issue Jun 10, 2024 · 0 comments

Comments

@alirezaaddeli
Copy link

No description provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant