{"id":373134,"date":"2024-05-21T05:29:00","date_gmt":"2024-05-21T05:29:00","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=373134"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=373134","title":{"rendered":"<span>\u041c\u0438\u0440 \u0433\u043b\u0430\u0437\u0430\u043c\u0438 \u0418\u0418<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041c\u043d\u043e\u0433\u0438\u0435 \u0441\u043b\u044b\u0448\u0430\u043b\u0438, \u0447\u0442\u043e \u0418\u0418 \u043c\u043e\u0436\u0435\u0442 \u0432\u0438\u0434\u0435\u0442\u044c. \u041d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0438 \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u0445 \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u0437\u0430 \u043e\u0431\u044a\u0435\u043a\u0442, \u0430 \u0432\u0438\u0434\u0435\u0442\u044c \u043f\u043e-\u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u043c\u0443. \u041f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043e \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435, \u0438 \u0432 \u0442\u0435\u043a\u0441\u0442\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u0435\u0442\u0430\u043b\u0438 \u0443\u0432\u0438\u0434\u0435\u043d\u043d\u043e\u0433\u043e. \u0421\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043c \u044d\u0442\u0443 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044e \u0443 \u0441\u0435\u0431\u044f \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 \u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u043a\u043e\u043f\u0430\u0435\u043c\u0441\u044f \u0432 \u043c\u043e\u0437\u0433\u0430\u0445 \u0418\u0418. \u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u044d\u0442\u0438 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u043d\u0430\u0432\u0435\u0434\u0443\u0442 \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u044b\u0435 \u043c\u044b\u0441\u043b\u0438 \u043f\u043e \u043f\u043e\u0432\u043e\u0434\u0443 \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0430 \u043c\u0430\u0448\u0438\u043d \u0438 \u043d\u0430\u0442\u043e\u043b\u043a\u043d\u0443\u0442 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441: &#171;\u0410 \u0442\u0430\u043a \u043b\u0438 \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u043d \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u043e\u0433\u043e?&#187;<\/p>\n<h3>Colab<\/h3>\n<p>\u041d\u0430\u043c \u0441\u043d\u043e\u0432\u0430 \u043d\u0443\u0436\u0435\u043d \u0431\u0443\u0434\u0435\u0442 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 GPU. <a href=\"https:\/\/colab.research.google.com\">\u0418\u0434\u0435\u043c \u0432 \u041a\u043e\u043b\u0430\u0431\u0443 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435<\/a>.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c\u0441\u044f \u043f\u043e \u043f\u043e\u0432\u043e\u0434\u0443 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0440\u0435\u0434\u0443. \u0412 \u043d\u0430\u0447\u0430\u043b\u0435 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/companies\/ppr\/articles\/802949\/\">\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u0436\u0435\u043b\u0435\u0437\u0435 \u0431\u0435\u0437 Midjourney<\/a> \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e, \u0447\u0442\u043e \u0438 \u043a\u0430\u043a \u043d\u0430\u0434\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u0438\u0434\u0442\u0438 \u0434\u0430\u043b\u044c\u0448\u0435.<\/p>\n<h3>Install<\/h3>\n<p>\u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438. \u041a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043f\u0443\u0441\u0442\u0443\u044e \u044f\u0447\u0435\u0439\u043a\u0443 \u0431\u043b\u043e\u043a\u043d\u043e\u0442\u0430:<\/p>\n<p><code>!pip install transformers timm einops -q<\/code><\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0432 \u044f\u0447\u0435\u0439\u043a\u0435. \u041d\u0430\u0432\u043e\u0434\u0438\u043c \u043a\u0443\u0440\u0441\u043e\u0440 \u043d\u0430 \u043a\u043e\u0434 \u0438 \u0436\u043c\u0435\u043c CTRL+ENTER, \u0438\u043b\u0438 \u0434\u043b\u044f \u043c\u0430\u043a\u043e\u0432 \u0421OMMAND+ENTER. \u0418\u043b\u0438 \u0436\u043c\u0435\u043c \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u0441\u043b\u0435\u0432\u0430 \u044f\u0447\u0435\u0439\u043a\u0438. \u0416\u0434\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f.<\/p>\n<h3>\u0418\u043c\u043f\u043e\u0440\u0442\u044b<\/h3>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u044f\u0447\u0435\u0439\u043a\u0443 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434:<\/p>\n<p><code>from transformers import AutoModelForCausalLM, AutoTokenizer<br \/> from PIL import Image<br \/> import torch<br \/> import locale<\/p>\n<p> locale.getpreferredencoding = lambda: \"UTF-8\"<\/p>\n<p> model_id = \"vikhyatk\/moondream2\"<br \/> revision = \"2024-03-05\"<\/code><\/p>\n<p> <code># Check if CUDA (GPU support) is available and then set the device to GPU or CPU<br \/> device = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")<\/code><\/p>\n<p> <code># Load the model and tokenizer<br \/> model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True, revision=revision).to(device)<br \/> tokenizer = AutoTokenizer.from_pretrained(model_id, revision=revision)<\/code><\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c. \u0416\u0434\u0435\u043c, \u043a\u043e\u0433\u0434\u0430 \u043a\u043e\u0434 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0441\u044f.<\/p>\n<p>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0430\u0441\u044c, \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435.<\/p>\n<h3>\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a<\/h3>\n<p>\u041d\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u0431\u0443\u0434\u0443\u0442 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438, \u0447\u0442\u043e\u0431\u044b \u0434\u0430\u0432\u0430\u0442\u044c \u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430 \u043e\u043f\u043e\u0437\u043d\u0430\u043d\u0438\u0435. \u0418\u0445 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 \u0441\u0440\u0435\u0434\u0435 \u0431\u043b\u043e\u043a\u043d\u043e\u0442\u0430, \u043d\u043e \u043e\u043d\u0438 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u043f\u0440\u043e\u043f\u0430\u0434\u0443\u0442. \u0415\u0441\u0442\u044c \u0441\u043f\u043e\u0441\u043e\u0431 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u043d\u0430 \u0413\u0443\u0433\u043b \u0414\u0438\u0441\u043a\u0435 \u0438 \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u043f\u043a\u0443 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043a \u0431\u043b\u043e\u043a\u043d\u043e\u0442\u0443 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0441\u0440\u0435\u0434\u044b. \u042d\u0442\u043e\u0433\u043e \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u043c. \u041f\u043e\u0441\u0442\u0443\u043f\u0438\u043c \u043f\u0440\u043e\u0449\u0435 \u2014 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435. \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c, \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<p><code>!wget -O image.jpg https:\/\/nukadeti.ru\/content\/images\/essence\/tale\/261\/1248.jpg<\/code><\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043a\u043e\u0434.<\/p>\n<h3>\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430<\/h3>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u043c\u044b \u0441\u043a\u0430\u0447\u0430\u043b\u0438.<\/p>\n<p>\u041a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434:<\/p>\n<p><code>image = Image.open('image.jpg') #<\/code>\u0435\u0441\u043b\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0430 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u043f\u0430\u043f\u043a\u0435 \u0441\u0440\u0435\u0434\u044b \u0431\u043b\u043e\u043a\u043d\u043e\u0442\u0430, \u0442\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u0443\u0442\u044c \u043a \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044e<br \/> <code>image<\/code><\/p>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u043c\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b\u0438:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c95\/a62\/2a7\/c95a622a71087686b4a7c25ba32834f5.png\" width=\"1039\" height=\"785\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c95\/a62\/2a7\/c95a622a71087686b4a7c25ba32834f5.png\"\/><\/figure>\n<h3>\u0417\u0440\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044e \u0437\u0440\u0435\u043d\u0438\u044f \u0418\u0418.<\/p>\n<p>\u041a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u0432 \u043d\u043e\u0432\u0443\u044e \u044f\u0447\u0435\u0439\u043a\u0443<\/p>\n<p><code>image = Image.open('image.jpg') #path of the input image<\/p>\n<p> question = 'What do you see in the image?'<\/p>\n<p> enc_image = model.encode_image(image).to(device)<\/p>\n<p> # Generate the answer<br \/> answer = model.answer_question(enc_image, question, tokenizer)<\/p>\n<p> # If the output is a tensor, move it back to CPU for further operations like print<br \/> if isinstance(answer, torch.Tensor):<br \/> \u00a0\u00a0\u00a0 answer = answer.cpu()<\/p>\n<p> print(answer)<\/code><\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043a\u043e\u0434\u0435 \u0435\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <strong>question<\/strong>, c \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b. \u0418\u0445 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0435\u0451 \u0440\u043e\u0434\u043d\u043e\u043c \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0430 \u043d\u0430\u0441 \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u043b\u0430. \u042d\u0442\u043e \u043d\u0435\u0442\u0440\u0443\u0434\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/translate.google.com\">Google\u041f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a<\/a>.<\/p>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0443\u0437\u043d\u0430\u0442\u044c, \u0447\u0442\u043e \u0432\u0438\u0434\u0438\u0442 \u0418\u0418 \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435. \u0418\u0442\u0430\u043a, \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441: What do you see in the image?<\/p>\n<p><em>\u041f\u0435\u0440\u0435\u0432\u043e\u0434: \u0427\u0442\u043e \u0442\u044b \u0432\u0438\u0434\u0438\u0448\u044c \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435?<\/em><\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043a\u043e\u0434 \u0432 \u044f\u0447\u0435\u0439\u043a\u0435. \u041e\u0442\u0432\u0435\u0442 \u043c\u043e\u0434\u0435\u043b\u0438 \u0442\u0430\u043a\u043e\u0439: A painting is depicted in this image, featuring a rabbit, a fox, and another animal. The animals are seated on a bench, with a wooden house in the background. The ground is covered with grass.<\/p>\n<p><em>\u041f\u0435\u0440\u0435\u0432\u043e\u0434: \u041d\u0430 \u044d\u0442\u043e\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u0430, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u044b \u043a\u0440\u043e\u043b\u0438\u043a, \u043b\u0438\u0441\u0430 \u0438 \u0435\u0449\u0435 \u043e\u0434\u043d\u043e \u0436\u0438\u0432\u043e\u0442\u043d\u043e\u0435. \u0416\u0438\u0432\u043e\u0442\u043d\u044b\u0435 \u0441\u0438\u0434\u044f\u0442 \u043d\u0430 \u0441\u043a\u0430\u043c\u0435\u0439\u043a\u0435 \u043d\u0430 \u0444\u043e\u043d\u0435 \u0434\u0435\u0440\u0435\u0432\u044f\u043d\u043d\u043e\u0433\u043e \u0434\u043e\u043c\u0430. \u0417\u0435\u043c\u043b\u044f \u043f\u043e\u043a\u0440\u044b\u0442\u0430 \u0442\u0440\u0430\u0432\u043e\u0439.<\/em><\/p>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c \u043d\u0435 \u0443\u0432\u0435\u0440\u0435\u043d\u0430, \u0447\u0442\u043e \u0437\u0430 \u0442\u0440\u0435\u0442\u0438\u0439 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436 \u0432 \u044d\u0442\u043e\u043c \u0441\u044e\u0436\u0435\u0442\u0435. \u0417\u0430\u0434\u0430\u0434\u0438\u043c \u0443\u0442\u043e\u0447\u043d\u044f\u044e\u0449\u0438\u0439 \u0432\u043e\u043f\u0440\u043e\u0441: Who is depicted sitting on the bench next to the fox?<\/p>\n<p><em>\u041f\u0435\u0440\u0435\u0432\u043e\u0434: \u041a\u0442\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d \u0441\u0438\u0434\u044f\u0449\u0438\u043c \u043d\u0430 \u0441\u043a\u0430\u043c\u0435\u0439\u043a\u0435 \u0440\u044f\u0434\u043e\u043c \u0441 \u043b\u0438\u0441\u043e\u0439?<\/em><\/p>\n<p>\u041f\u0440\u043e\u0441\u0442\u043e \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u043d\u0430 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <strong>question<\/strong> \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043a\u043e\u0434 \u0432 \u044f\u0447\u0435\u0439\u043a\u0435.<\/p>\n<p><em>\u041e\u0442\u0432\u0435\u0442<\/em>: A cat is depicted sitting on a bench next to a fox.<\/p>\n<p><em>\u041f\u0435\u0440\u0435\u0432\u043e\u0434: \u041a\u043e\u0442 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d \u0441\u0438\u0434\u044f\u0449\u0438\u043c \u043d\u0430 \u0441\u043a\u0430\u043c\u0435\u0439\u043a\u0435 \u0440\u044f\u0434\u043e\u043c \u0441 \u043b\u0438\u0441\u043e\u0439.<\/em><\/p>\n<p>\u0412\u0435\u0440\u043d\u043e!<\/p>\n<p>\u0421\u043f\u0440\u043e\u0441\u0438\u043c \u0432\u043e\u0442 \u0447\u0442\u043e: Which of the characters depicted is the smallest?<\/p>\n<p><em>\u041f\u0435\u0440\u0435\u0432\u043e\u0434: \u041a\u0430\u043a\u043e\u0439 \u0438\u0437 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044b\u0445 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0435\u0439 \u0441\u0430\u043c\u044b\u0439 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439?<\/em><\/p>\n<p><em>\u041e\u0442\u0432\u0435\u0442<\/em>: The smallest character is a rabbit, depicted in a grey outfit and standing in front of a house. The other two characters are a fox and a cat, also present in the house.<\/p>\n<p><em>\u041f\u0435\u0440\u0435\u0432\u043e\u0434: \u0421\u0430\u043c\u044b\u0439 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436 \u2014 \u043a\u0440\u043e\u043b\u0438\u043a, \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044b\u0439 \u0432 \u0441\u0435\u0440\u043e\u043c \u043d\u0430\u0440\u044f\u0434\u0435 \u0438 \u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u043f\u0435\u0440\u0435\u0434 \u0434\u043e\u043c\u043e\u043c. \u0414\u0432\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0430 \u2014 \u043b\u0438\u0441\u0430 \u0438 \u043a\u043e\u0442, \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0432 \u0434\u043e\u043c\u0435.<\/em><\/p>\n<p>\u0421 \u0446\u0432\u0435\u0442\u043e\u043c \u043d\u0430\u0440\u044f\u0434\u0430 \u0437\u0430\u0439\u0446\u0430-\u043a\u0440\u043e\u043b\u0438\u043a\u0430 \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0441\u043e\u0433\u043b\u0430\u0441\u0438\u0442\u044c\u0441\u044f. \u041d\u043e \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u043b\u043e\u0448\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u0438 \u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c. \u041e\u043d\u0430 \u0443 \u043d\u0430\u0441 \u0442\u043e\u0436\u0435 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0430\u044f :).<\/p>\n<p>\u0411\u0443\u0434\u0435\u043c \u0443\u0442\u043e\u0447\u043d\u044f\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435. What color are the cat&#8217;s pants?<\/p>\n<p><em>\u041f\u0435\u0440\u0435\u0432\u043e\u0434: \u041a\u0430\u043a\u043e\u0433\u043e \u0446\u0432\u0435\u0442\u0430 \u0448\u0442\u0430\u043d\u044b \u0443 \u043a\u043e\u0442\u0430?<\/em><\/p>\n<p><em>\u041e\u0442\u0432\u0435\u0442<\/em>: Green<\/p>\n<p><em>\u041f\u0435\u0440\u0435\u0432\u043e\u0434: \u0417\u0435\u043b\u0435\u043d\u044b\u0439<\/em><\/p>\n<p>What color is the bunny&#8217;s shirt?<\/p>\n<p><em>\u041f\u0435\u0440\u0435\u0432\u043e\u0434: \u041a\u0430\u043a\u043e\u0433\u043e \u0446\u0432\u0435\u0442\u0430 \u0440\u0443\u0431\u0430\u0448\u043a\u0430 \u0443 \u0437\u0430\u0439\u0447\u0438\u043a\u0430?<\/em><\/p>\n<p><em>\u041e\u0442\u0432\u0435\u0442<\/em>: Orange<\/p>\n<p><em>\u041f\u0435\u0440\u0435\u0432\u043e\u0434: \u041e\u0440\u0430\u043d\u0436\u0435\u0432\u044b\u0439<\/em><\/p>\n<p>\u041d\u0435\u043f\u043b\u043e\u0445\u043e.<\/p>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u0434\u0430\u0434\u0438\u043c \u0432\u043e\u043f\u0440\u043e\u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0440\u0443\u0433\u043e\u0439, \u043f\u043e\u0441\u0435\u0440\u044c\u0435\u0437\u043d\u0435\u0435.<\/p>\n<p>Is there a threat to the hare in this image?<\/p>\n<p><em>\u041f\u0435\u0440\u0435\u0432\u043e\u0434: \u0415\u0441\u0442\u044c \u043b\u0438 \u0443\u0433\u0440\u043e\u0437\u0430 \u0434\u043b\u044f \u0437\u0430\u0439\u0446\u0430 \u043d\u0430 \u044d\u0442\u043e\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438?<\/em><\/p>\n<p><em>\u041e\u0442\u0432\u0435\u0442<\/em>: No, there is no threat to the hare in this image. The scene features a cat and a fox sitting on a bench, while a rabbit is standing nearby. The rabbit is not in any immediate danger, and there is no indication that predators are present.<\/p>\n<p><em>\u041f\u0435\u0440\u0435\u0432\u043e\u0434: \u041d\u0435\u0442, \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0443\u0433\u0440\u043e\u0437\u044b \u0437\u0430\u0439\u0446\u0443 \u043d\u0430 \u044d\u0442\u043e\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438 \u043d\u0435\u0442. \u0412 \u0441\u0446\u0435\u043d\u0435 \u043a\u043e\u0442 \u0438 \u043b\u0438\u0441\u0430 \u0441\u0438\u0434\u044f\u0442 \u043d\u0430 \u0441\u043a\u0430\u043c\u0435\u0439\u043a\u0435, \u0430 \u0440\u044f\u0434\u043e\u043c \u0441\u0442\u043e\u0438\u0442 \u043a\u0440\u043e\u043b\u0438\u043a. \u041a\u0440\u043e\u043b\u0438\u043a\u0443 \u043d\u0435 \u0433\u0440\u043e\u0437\u0438\u0442 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c, \u0438 \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u0445\u0438\u0449\u043d\u0438\u043a\u043e\u0432.<\/em><\/p>\n<p>\u0417\u0430\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u0445\u0438\u0449\u043d\u0438\u043a\u0438-\u0442\u043e \u0435\u0441\u0442\u044c, \u043d\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u043b\u0438\u0441\u044b \u043a\u0430\u043a \u0434\u0440\u0443\u0436\u0435\u043b\u044e\u0431\u043d\u043e\u0435, \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043d\u0435\u0441\u0442\u0438 \u0435\u0435 \u043a \u0445\u0438\u0449\u043d\u0438\u043a\u0443 \u2014 \u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044e \u0443\u0433\u0440\u043e\u0437\u044b \u0434\u043b\u044f \u0437\u0430\u0439\u0446\u0430. \u0425\u043e\u0442\u044f \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u0418\u0418 \u043e\u0448\u0438\u0431\u0441\u044f \u0432 \u0434\u0435\u0442\u0430\u043b\u044f\u0445, \u043d\u043e \u043f\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443 \u0432\u043e\u043f\u0440\u043e\u0441\u0430 \u043e\u0442\u0432\u0435\u0442\u0438\u043b \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e. \u0417\u0430\u0449\u0438\u0449\u0430\u0442\u044c \u0435\u0433\u043e \u043c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c, \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u043a\u0440\u043e\u0448\u0435\u0447\u043d\u0430\u044f, \u0447\u0442\u043e \u0438 \u0442\u0430\u043a\u043e\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0434\u043b\u044f \u043d\u0435\u0435 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0433\u0435\u043d\u0438\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<h3>\u0417\u0430\u0434\u0430\u043d\u0438\u0435 \u0441\u043e \u0437\u0432\u0435\u0437\u0434\u043e\u0447\u043a\u043e\u0439<\/h3>\n<p>\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u0434\u0440\u0443\u0433\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435.<\/p>\n<p><code>!wget -O image.jpg https:\/\/cdnn21.img.ria.ru\/images\/15580\/75\/155807501_0:0:0:0_600x0_80_0_0_257bb0d3ef49560de8ae7109d11ec9f1.jpg<\/code><\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b\u0438<\/p>\n<p><code>image = Image.open('image.jpg') #path of the input image<br \/> image<\/code><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/2ec\/0a0\/a4c\/2ec0a0a4c9c2d2ee3e0d8a35657f3df0.png\" width=\"1039\" height=\"781\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2ec\/0a0\/a4c\/2ec0a0a4c9c2d2ee3e0d8a35657f3df0.png\"\/><\/figure>\n<p>\u0422\u0430\u043a\u0430\u044f \u0432\u043e\u0442 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430. \u042d\u0442\u043e \u0443\u0436\u0435 \u043d\u0435 \u0441\u043a\u0430\u0437\u043a\u0438.<\/p>\n<p>\u0421\u043f\u0440\u043e\u0441\u0438\u043c \u0443 \u043c\u043e\u0434\u0435\u043b\u0438, \u0447\u0442\u043e \u043e\u043d\u0430 \u0432\u0438\u0434\u0438\u0442, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0430\u043a\u043e\u0433\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u0430: Describe the signs of aggression in the image, if any.<\/p>\n<p><em>\u041f\u0435\u0440\u0435\u0432\u043e\u0434: \u041e\u043f\u0438\u0448\u0438\u0442\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u0430\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u043d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438, \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0435\u0441\u0442\u044c.<\/em><\/p>\n<p><em>\u041e\u0442\u0432\u0435\u0442<\/em>: In the center of the image, a group of people are engaged in a fight. One individual is holding a flag, while another person is holding a drum. The background features buildings, trees, and additional people, along with a road.<\/p>\n<p><em>\u041f\u0435\u0440\u0435\u0432\u043e\u0434: \u0412 \u0446\u0435\u043d\u0442\u0440\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0433\u0440\u0443\u043f\u043f\u0430 \u043b\u044e\u0434\u0435\u0439 \u0432\u0435\u0434\u0435\u0442 \u0434\u0440\u0430\u043a\u0443. \u041e\u0434\u0438\u043d \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0434\u0435\u0440\u0436\u0438\u0442 \u0444\u043b\u0430\u0433, \u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u0434\u0435\u0440\u0436\u0438\u0442 \u0431\u0430\u0440\u0430\u0431\u0430\u043d. \u041d\u0430 \u0437\u0430\u0434\u043d\u0435\u043c \u043f\u043b\u0430\u043d\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u044b \u0437\u0434\u0430\u043d\u0438\u044f, \u0434\u0435\u0440\u0435\u0432\u044c\u044f \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043b\u044e\u0434\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u0440\u043e\u0433\u0430.<\/em><\/p>\n<h3>\u0413\u0438\u0444\u043a\u0438<\/h3>\n<p>\u0414\u0430\u043d\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u044b\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u043d\u043e \u0438 \u0433\u0438\u0444\u043a\u0438. \u0414\u043e\u043b\u0433\u043e \u043d\u0430 \u044d\u0442\u043e\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0441\u0442\u0430\u043d\u0435\u043c. \u041f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043a\u0430\u0436\u0435\u043c, \u0447\u0442\u043e \u044d\u0442\u043e \u0442\u043e\u0436\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e.<\/p>\n<p>\u0421\u043a\u0430\u0447\u0430\u0435\u043c \u0433\u0438\u0444\u043a\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0430\u043a\u043e\u0433\u043e \u043a\u043e\u0434\u0430.<\/p>\n<p><code>!wget -O tenor.gif https:\/\/media1.tenor.com\/m\/ZuAyMucnnJEAAAAC\/spongebob-squarepants.gif<\/code><\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u043c\u044b \u0441\u043a\u0430\u0447\u0430\u043b\u0438. \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434.<\/p>\n<p>\u00a0<code># Load the GIF file<br \/> gif_path = 'tenor.gif'\u00a0 # Replace with your gif path<br \/> gif = Image.open(gif_path)<br \/> gif<\/code><\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/069\/411\/9a4\/0694119a4d1a1f6c381ce19fba40d123.gif\" width=\"498\" height=\"378\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/069\/411\/9a4\/0694119a4d1a1f6c381ce19fba40d123.gif\"\/><\/figure>\n<p>\u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u0434 \u0432 \u043d\u043e\u0432\u0443\u044e \u044f\u0447\u0435\u0439\u043a\u0443 \u0434\u043b\u044f \u043f\u043e\u043a\u0430\u0434\u0440\u043e\u0432\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0433\u0438\u0444\u043e\u043a. \u0413\u0438\u0444\u043a\u0430 \u2014 \u044d\u0442\u043e \u0442\u043e\u0436\u0435 \u0432\u0438\u0434\u0435\u043e, \u043d\u043e \u0441 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0439 \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439 \u043a\u0430\u0434\u0440\u043e\u0432. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0438\u0434\u0435\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e. \u041d\u043e \u0442\u0443\u0442 \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0437\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438. \u041e\u0434\u043d\u043e \u0434\u0435\u043b\u043e \u2014 \u043e\u0434\u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430, \u0434\u0440\u0443\u0433\u043e\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, 24 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443. \u0422.\u0435. \u044d\u0442\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0430 \u043e\u0434\u043d\u0443 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u0432\u0438\u0434\u0435\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u043e 24 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438. \u042d\u0442\u043e \u0434\u043e\u043b\u0433\u043e. \u041d\u0443\u0436\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0436\u0435\u043b\u0435\u0437\u0430, \u0447\u0435\u043c \u043c\u044b \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442.<\/p>\n<p>\u041a\u043e\u0434:<\/p>\n<p><code># Load the GIF file<br \/> gif_path = 'tenor.gif'\u00a0 # Replace with your gif path<br \/> gif = Image.open(gif_path)<\/p>\n<p> question = \"Which character is in the image?\"<\/p>\n<p> frame_count = 0<br \/> answers = []<\/p>\n<p> while True:<br \/> \u00a0\u00a0\u00a0 try:<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # Seek to the next frame<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 gif.seek(frame_count)<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # Process every 5th frame<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 if frame_count % 10 == 0:<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # Convert the frame to a format compatible with the model<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 frame = gif.convert('RGB')<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # Process the frame with the model<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 enc_image = model.encode_image(frame).to(device)<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 answer = model.answer_question(enc_image, question, tokenizer)<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 if isinstance(answer, torch.Tensor):<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 answer = answer.cpu()<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # Append the answer<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 answers.append(answer)<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 frame_count += 1<br \/> \u00a0\u00a0\u00a0 except EOFError:<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # Exit the loop when the end of the GIF is reached<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 break<\/p>\n<p> # Concatenate and print all answers<br \/> all_answers = '\\n'.join(answers)<br \/> print(all_answers)<\/code><\/p>\n<p>\u0412\u043e\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430:<\/p>\n<p>Which character is in the image?<\/p>\n<p>What is the character in the image doing?<\/p>\n<p>What is the text at the bottom of the image?<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u0434\u0430\u0435\u043c \u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0438. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043e\u0442\u0432\u0435\u0442\u044b. <em>\u042d\u0442\u043e \u0413\u0443\u0431\u043a\u0430\u0411\u043e\u0431. \u041f\u0435\u0440\u0441\u043e\u043d\u0430\u0436 \u043d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438 \u0441\u0442\u043e\u0438\u0442 \u0438, \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u0441 \u0443\u043b\u044b\u0431\u043a\u043e\u0439 \u043d\u0430 \u043b\u0438\u0446\u0435. \u041d\u0430 \u0437\u0430\u0434\u043d\u0435\u043c \u043f\u043b\u0430\u043d\u0435 \u0435\u0441\u0442\u044c \u0442\u0435\u043a\u0441\u0442. \u041d\u0430\u0434\u043f\u0438\u0441\u044c \u043d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438 \u0433\u043b\u0430\u0441\u0438\u0442: Happy April Fool&#8217;s Day!<\/em><\/p>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u0430\u0434\u0440\u0430. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043e\u0431\u0449\u0435\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0432\u0438\u0434\u0435\u043e, \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0432\u0441\u0435 \u043e\u0442\u0432\u0435\u0442\u044b \u044d\u0442\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432 \u0434\u0440\u0443\u0433\u0443\u044e \u0434\u043b\u044f \u0441\u0430\u043c\u043c\u0430\u0440\u0438\u0437\u0430\u0446\u0438\u0438. \u041d\u043e \u044d\u0442\u043e \u0442\u0435\u043c\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438.<\/p>\n<h3>\u0418\u0418-\u0445\u0443\u0434\u043e\u0436\u043d\u0438\u043a<\/h3>\n<p>\u041f\u0440\u0438\u043a\u043e\u0441\u043d\u0435\u043c\u0441\u044f \u043a \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0441\u043a\u0440\u044b\u0442\u044b\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 &#171;\u0433\u043e\u043b\u043e\u0432\u0435&#187; \u043c\u0430\u0448\u0438\u043d\u044b, \u043d\u043e \u0441\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0438 \u0443 \u043b\u044e\u0434\u0435\u0439.<\/p>\n<p>\u0421\u043a\u0430\u0447\u0430\u0435\u043c \u0434\u0440\u0443\u0433\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443:<\/p>\n<p><code>!wget -O image.jpg https:\/\/pentaschool.ru\/upload_2\/Dizajn-detskoj.jpg<\/code><\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c<\/p>\n<p><code>image = Image.open('image.jpg') #path of the input image<br \/> image<\/code><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/599\/b5d\/9b2\/599b5d9b26ef543a3ad28a69511653e1.png\" width=\"1039\" height=\"693\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/599\/b5d\/9b2\/599b5d9b26ef543a3ad28a69511653e1.png\"\/><\/figure>\n<p>\u041c\u0438\u043b\u043e\u0442\u0430.<\/p>\n<p>\u041c\u044b \u0443\u0441\u043b\u043e\u0436\u043d\u0438\u043c \u0437\u0430\u0434\u0430\u0447\u0443 \u0438 \u0437\u0430\u0434\u0430\u0434\u0438\u043c \u043d\u0435 \u043e\u0434\u0438\u043d-\u0434\u0432\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u0430, \u0430 \u0441\u0440\u0430\u0437\u0443 \u0441\u0435\u0440\u0438\u044e \u0441 \u0443\u0442\u043e\u0447\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u0434\u0435\u0442\u0430\u043b\u0435\u0439. \u0411\u0443\u0434\u0435\u043c \u043d\u0430\u0440\u0430\u0449\u0438\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0445 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0439 \u0441 \u043d\u0438\u043c. \u041f\u043e\u0437\u0436\u0435 \u043c\u044b \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0443\u0432\u0438\u0434\u0435\u043d\u043d\u043e\u0435 \u043d\u0430 \u044d\u0442\u043e\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435. \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0435\u0451 \u0445\u0443\u0434\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u043d\u043e\u0432\u043e\u0439 \u044f\u0447\u0435\u0439\u043a\u0435:<\/p>\n<p><code>questions = '''What do you see in the image?<br \/> Describe the child's appearance?<br \/> Describe the child's face?<br \/> Describe the child's hair?<br \/> What color is the child's eyes?<br \/> What toys are in the image?<br \/> Are there any other toys in the image besides the teddy bear?'''<\/code><\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0432 \u044f\u0447\u0435\u0439\u043a\u0435. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0433\u043e\u0442\u043e\u0432\u044b \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043f\u043e \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0438, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043e\u0442\u0432\u0435\u0442\u044b \u043d\u0430 \u043d\u0438\u0445.<\/p>\n<p>\u041a\u043e\u0434 \u0434\u043b\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u044f\u0447\u0435\u0439\u043a\u0438:<\/p>\n<p><code>image = Image.open('image.jpg') #path of the input image<\/p>\n<p> enc_image = model.encode_image(image).to(device)<\/p>\n<p> for question in questions.splitlines():<br \/> \u00a0 # Generate the answer<br \/> \u00a0 answer = model.answer_question(enc_image, question, tokenizer)<\/p>\n<p> \u00a0 # If the output is a tensor, move it back to CPU for further operations like print<br \/> \u00a0 if isinstance(answer, torch.Tensor):<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0 answer = answer.cpu()<\/p>\n<p> \u00a0 print(answer)<\/code><\/p>\n<p><em>\u041e\u0442\u0432\u0435\u0442<\/em>:<\/p>\n<p>A boy is seated on a bed, holding a book in his hands. The bed is adorned with pillows, and a blue toy is present. The background features a white wall and a window.<\/p>\n<p>A child is depicted in this image, seated on a bed and dressed in a yellow t-shirt and shorts. The child is holding a book in one hand and appears to be smiling. The background features a few pillows and toys.<\/p>\n<p>The child&#8217;s face is smiling, and there is a slight curl at the end of the hair. The child is seated on a bed, holding a book in one hand.<\/p>\n<p>The child has blonde hair, which is described as &#171;blond&#187; in some descriptions.<\/p>\n<p>The child has blue eyes.<\/p>\n<p>The image features a child sitting on a bed, holding a book. Nearby, there are blue pillows and a blue teddy bear.<\/p>\n<p>Yes, there are other toys present in the image, including a teddy bear and a doll.<\/p>\n<p><em>\u041f\u0435\u0440\u0435\u0432\u043e\u0434<\/em>:<\/p>\n<p><em>\u041c\u0430\u043b\u044c\u0447\u0438\u043a \u0441\u0438\u0434\u0438\u0442 \u043d\u0430 \u043a\u0440\u043e\u0432\u0430\u0442\u0438, \u0434\u0435\u0440\u0436\u0430 \u0432 \u0440\u0443\u043a\u0430\u0445 \u043a\u043d\u0438\u0433\u0443. \u041a\u0440\u043e\u0432\u0430\u0442\u044c \u0443\u043a\u0440\u0430\u0448\u0435\u043d\u0430 \u043f\u043e\u0434\u0443\u0448\u043a\u0430\u043c\u0438 \u0438 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u0438\u043d\u044f\u044f \u0438\u0433\u0440\u0443\u0448\u043a\u0430. \u041d\u0430 \u0437\u0430\u0434\u043d\u0435\u043c \u043f\u043b\u0430\u043d\u0435 \u2014 \u0431\u0435\u043b\u0430\u044f \u0441\u0442\u0435\u043d\u0430 \u0438 \u043e\u043a\u043d\u043e.<\/em><\/p>\n<p><em>\u041d\u0430 \u044d\u0442\u043e\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d \u0440\u0435\u0431\u0435\u043d\u043e\u043a, \u0441\u0438\u0434\u044f\u0449\u0438\u0439 \u043d\u0430 \u043a\u0440\u043e\u0432\u0430\u0442\u0438 \u0438 \u043e\u0434\u0435\u0442\u044b\u0439 \u0432 \u0436\u0435\u043b\u0442\u0443\u044e \u0444\u0443\u0442\u0431\u043e\u043b\u043a\u0443 \u0438 \u0448\u043e\u0440\u0442\u044b. \u0420\u0435\u0431\u0435\u043d\u043e\u043a \u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u043d\u0438\u0433\u0443 \u0432 \u043e\u0434\u043d\u043e\u0439 \u0440\u0443\u043a\u0435 \u0438, \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0443\u043b\u044b\u0431\u0430\u0435\u0442\u0441\u044f. \u041d\u0430 \u0437\u0430\u0434\u043d\u0435\u043c \u043f\u043b\u0430\u043d\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0434\u0443\u0448\u0435\u043a \u0438 \u0438\u0433\u0440\u0443\u0448\u0435\u043a.<\/em><\/p>\n<p><em>\u041b\u0438\u0446\u043e \u0440\u0435\u0431\u0435\u043d\u043a\u0430 \u0443\u043b\u044b\u0431\u0430\u0435\u0442\u0441\u044f, \u043d\u0430 \u043a\u043e\u043d\u0447\u0438\u043a\u0430\u0445 \u0432\u043e\u043b\u043e\u0441 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0437\u0430\u0432\u0438\u0442\u043e\u043a. \u0420\u0435\u0431\u0435\u043d\u043e\u043a \u0441\u0438\u0434\u0438\u0442 \u043d\u0430 \u043a\u0440\u043e\u0432\u0430\u0442\u0438, \u0434\u0435\u0440\u0436\u0430 \u0432 \u043e\u0434\u043d\u043e\u0439 \u0440\u0443\u043a\u0435 \u043a\u043d\u0438\u0433\u0443.<\/em><\/p>\n<p><em>\u0423 \u0440\u0435\u0431\u0435\u043d\u043a\u0430 \u0441\u0432\u0435\u0442\u043b\u044b\u0435 \u0432\u043e\u043b\u043e\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f\u0445 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043a\u0430\u043a \u00ab\u0441\u0432\u0435\u0442\u043b\u044b\u0435\u00bb.<\/em><\/p>\n<p><em>\u0423 \u0440\u0435\u0431\u0435\u043d\u043a\u0430 \u0433\u043e\u043b\u0443\u0431\u044b\u0435 \u0433\u043b\u0430\u0437\u0430.<\/em><\/p>\n<p><em>\u041d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d \u0440\u0435\u0431\u0435\u043d\u043e\u043a, \u0441\u0438\u0434\u044f\u0449\u0438\u0439 \u043d\u0430 \u043a\u0440\u043e\u0432\u0430\u0442\u0438 \u0438 \u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0432 \u0440\u0443\u043a\u0430\u0445 \u043a\u043d\u0438\u0433\u0443. \u0420\u044f\u0434\u043e\u043c \u0441\u0438\u043d\u0438\u0435 \u043f\u043e\u0434\u0443\u0448\u043a\u0438 \u0438 \u0441\u0438\u043d\u0438\u0439 \u043f\u043b\u044e\u0448\u0435\u0432\u044b\u0439 \u043c\u0438\u0448\u043a\u0430.<\/em><\/p>\n<p><em>\u0414\u0430, \u043d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0438\u0433\u0440\u0443\u0448\u043a\u0438, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u043f\u043b\u044e\u0448\u0435\u0432\u044b\u0439 \u043c\u0438\u0448\u043a\u0430 \u0438 \u043a\u0443\u043a\u043b\u0430.<\/em><\/p>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u043d\u0430\u043c \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043f\u043e\u0439\u0442\u0438 \u043d\u0430 \u043a\u043e\u043c\u043f\u0440\u043e\u043c\u0438\u0441\u0441. \u041f\u043e \u043d\u0430\u0448\u0435\u043c\u0443 \u0437\u0430\u043c\u044b\u0441\u043b\u0443 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0437 \u044d\u0442\u0438\u0445 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043e\u0434\u0438\u043d \u043f\u0440\u043e\u043c\u0442 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u0434\u0440\u0443\u0433\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0430 \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u043b\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u0443. \u0422\u0430\u043a \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u043a\u0430\u043a \u043c\u043e\u0434\u0435\u043b\u044c \u0443\u0432\u0438\u0434\u0435\u043b\u0430 \u044d\u0442\u0443 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443. \u041f\u0440\u043e\u0441\u0442\u0438\u0442\u0435 \u0437\u0430 \u0442\u0430\u0432\u0442\u043e\u043b\u043e\u0433\u0438\u044e, \u043d\u043e \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u043e\u043d\u0430 \u0443\u043c\u0435\u0441\u0442\u043d\u0430. \u0427\u0435\u043b\u043e\u0432\u0435\u043a \u0443\u0432\u0438\u0434\u0438\u0442, \u043a\u0430\u043a \u0432\u0438\u0434\u0438\u0442 \u043c\u0430\u0448\u0438\u043d\u0430.<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e \u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 <a href=\"https:\/\/habr.com\/ru\/companies\/ppr\/articles\/802949\/\">\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u0436\u0435\u043b\u0435\u0437\u0435 \u0431\u0435\u0437 Midjourney<\/a><\/p>\n<p>\u0423 \u043d\u0430\u0441 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u043c\u0442 \u0446\u0435\u043b\u0438\u043a\u043e\u043c. \u041c\u043e\u0434\u0435\u043b\u044c \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0442\u043e\u0436\u0435 \u043a\u0440\u043e\u0445\u043e\u0442\u043d\u0430\u044f, \u043e\u043d\u0430 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043d\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 77 \u0442\u043e\u043a\u0435\u043d\u043e\u0432. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0439\u0434\u0435\u043c \u043d\u0430 \u0445\u0438\u0442\u0440\u043e\u0441\u0442\u044c \u0438 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0441\u0430\u043c\u043c\u0430\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u0442\u043e\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430 \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f\u043c\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438, \u0442.\u0435. \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u0435\u043c\u0441\u044f \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043b\u043e\u0432 \u0432 \u0442\u0435\u043a\u0441\u0442\u0435 \u0438 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0441\u043c\u044b\u0441\u043b. \u0414\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0441\u0430\u043c\u043c\u0430\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0435\u043b\u0430\u043b\u0430\u0441\u044c \u043d\u0430 <strong>bioGPT<\/strong>, \u0442.\u0435. \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0433\u043e\u043b\u043e\u0432\u044b \u0445\u043e\u043c\u043e \u0441\u0430\u043f\u0438\u0435\u043d\u0441\u0430. \u0422\u0430\u043a \u0442\u043e\u0436\u0435 \u043c\u043e\u0436\u043d\u043e. \u041f\u043e\u043b\u0443\u0447\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<p><code>prompt = '''Create a painting in anime style:<br \/> Wide frame. A three year old smiling boy with blue eyes is seated on a bed and dressed in a t-shirt and shorts, holding a book in his hands. The child has blonde hair slightly curl at the end of the hair. The bed is adorned with while pillows. Blue teddy bear is present. White wall and a window.<br \/> '''<\/code><\/p>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u043c\u043e\u0434\u0435\u043b\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043e\u0442\u0434\u0430\u043b\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u043c \u0434\u043b\u044f \u0446\u0435\u043b\u0435\u0439 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cfe\/9a2\/6a9\/cfe9a26a9a1baf380ad9a2531bc3f4c5.png\" width=\"1039\" height=\"779\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cfe\/9a2\/6a9\/cfe9a26a9a1baf380ad9a2531bc3f4c5.png\"\/><\/figure>\n<p>\u041a\u0442\u043e-\u0442\u043e \u0441\u043a\u0430\u0436\u0435\u0442, \u0447\u0442\u043e \u043d\u0435 \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435. \u0415\u0441\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f. \u041d\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u0434\u0430\u0434\u0438\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u0443\u0436\u0435 \u0441\u0435\u0431\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u043e\u043f\u0440\u043e\u0441:<\/p>\n<p><em>&#171;\u041c\u043d\u043e\u0433\u043e \u043b\u0438 \u043b\u044e\u0434\u0435\u0439 \u043c\u043e\u0433\u0443\u0442 \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u0442\u043e, \u0447\u0442\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043e \u043d\u0430 \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438 \u0432 \u0434\u0435\u0442\u0430\u043b\u044f\u0445?&#187;<\/em><\/p>\n<p>\u0422\u0430\u043a\u0438\u0445 \u043b\u044e\u0434\u0435\u0439 \u043d\u0435\u043c\u043d\u043e\u0433\u043e. \u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0441\u0435\u0431\u044f. \u041d\u0435 \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b. \u041f\u043e\u0441\u0442\u0430\u0440\u0430\u0439\u0442\u0435\u0441\u044c \u0441\u0430\u043c\u0438 \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u0442\u0430\u043c \u0431\u044b\u043b\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043e. \u0412\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u043b\u0435\u0433\u0447\u0435 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0447\u0435\u043c \u0441\u0440\u0435\u0434\u043d\u0435\u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0443, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0432\u044b \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043b\u0438 \u0441\u0435\u0431\u0435 \u043e \u0434\u0435\u0442\u0430\u043b\u044f\u0445 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 \u0447\u0438\u0442\u0430\u043b\u0438 \u0443\u0442\u043e\u0447\u043d\u044f\u044e\u0449\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0438 \u043e\u0442\u0432\u0435\u0442\u044b \u043d\u0430 \u043d\u0438\u0445. \u0410 \u0435\u0441\u043b\u0438 \u0431\u044b \u0438\u0445 \u043d\u0435 \u0431\u044b\u043b\u043e, \u0438 \u0432\u0430\u043c \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438 \u044d\u0442\u0443 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u043d\u0430 3 \u0438\u043b\u0438 5 \u0441\u0435\u043a\u0443\u043d\u0434? \u041d\u0443 \u0438, \u0432 \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u043d\u0446\u043e\u0432, \u0445\u0443\u0434\u043e\u0436\u043d\u0438\u043a\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u0438\u0434\u0435\u0442\u044c. \u041e\u043d \u0442\u0430\u043a \u0432\u0438\u0434\u0438\u0442 \ud83d\ude42<\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435, \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 &#171;\u0447\u0435\u043b\u043e\u0432\u0435\u0447\u043d\u043e\u0441\u0442\u0438&#187; \u043c\u0430\u0448\u0438\u043d\u044b. \u041c\u043e\u0436\u0435\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u0438\u0437-\u0437\u0430 \u0442\u0430\u043a\u0438\u0445 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0439 \u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u0438\u0434\u0435\u043d\u0438\u044f \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0445\u0443\u0434\u043e\u0436\u043d\u0438\u043a\u0430\u043c\u0438, \u043d\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0430. \u0418 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c, \u043c\u0430\u0448\u0438\u043d\u044b \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b, \u0435\u0441\u043b\u0438 \u043b\u044e\u0434\u0438 \u043e\u0441\u0442\u0430\u0432\u044f\u0442 \u043c\u0435\u0441\u0442\u043e \u0432 \u0441\u043e\u0437\u043d\u0430\u043d\u0438\u0438 \u0418\u0418 \u0434\u043b\u044f \u043d\u0435\u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432. \u0423 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0432\u043e\u0434 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u0441 \u043c\u0430\u0448\u0438\u043d\u0430\u043c\u0438, \u0443\u0447\u0438\u0442\u044c \u0438\u0445, \u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0443 \u043d\u0438\u0445 \u0438 \u0440\u0430\u0434\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0443\u0441\u043f\u0435\u0445\u0430\u043c. \u041c\u043e\u0436\u0435\u0442, \u0432 \u044d\u0442\u043e\u0439 \u0440\u0430\u0437\u043d\u0438\u0446\u0435 \u043c\u0435\u0436\u0434\u0443 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u0432\u044b\u0434\u0443\u043c\u043a\u043e\u0439 \u043a\u0440\u043e\u0435\u0442\u0441\u044f \u0447\u0442\u043e-\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0435\u0435, \u0447\u0435\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0446\u0438\u0444\u0440. \u041c\u043e\u0436\u0435\u0442 \u0442\u0430\u043c \u0438 \u0441\u043f\u0440\u044f\u0442\u0430\u043d\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u043d\u043e\u0441\u0442\u044c.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/806411\/\"> https:\/\/habr.com\/ru\/articles\/806411\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041c\u043d\u043e\u0433\u0438\u0435 \u0441\u043b\u044b\u0448\u0430\u043b\u0438, \u0447\u0442\u043e \u0418\u0418 \u043c\u043e\u0436\u0435\u0442 \u0432\u0438\u0434\u0435\u0442\u044c. \u041d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0438 \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u0445 \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u0437\u0430 \u043e\u0431\u044a\u0435\u043a\u0442, \u0430 \u0432\u0438\u0434\u0435\u0442\u044c \u043f\u043e-\u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u043c\u0443. \u041f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043e \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435, \u0438 \u0432 \u0442\u0435\u043a\u0441\u0442\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u0435\u0442\u0430\u043b\u0438 \u0443\u0432\u0438\u0434\u0435\u043d\u043d\u043e\u0433\u043e. \u0421\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043c \u044d\u0442\u0443 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044e \u0443 \u0441\u0435\u0431\u044f \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 \u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u043a\u043e\u043f\u0430\u0435\u043c\u0441\u044f \u0432 \u043c\u043e\u0437\u0433\u0430\u0445 \u0418\u0418. \u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u044d\u0442\u0438 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u043d\u0430\u0432\u0435\u0434\u0443\u0442 \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u044b\u0435 \u043c\u044b\u0441\u043b\u0438 \u043f\u043e \u043f\u043e\u0432\u043e\u0434\u0443 \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0430 \u043c\u0430\u0448\u0438\u043d \u0438 \u043d\u0430\u0442\u043e\u043b\u043a\u043d\u0443\u0442 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441: &#171;\u0410 \u0442\u0430\u043a \u043b\u0438 \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u043d \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u043e\u0433\u043e?&#187;<\/p>\n<h3>Colab<\/h3>\n<p>\u041d\u0430\u043c \u0441\u043d\u043e\u0432\u0430 \u043d\u0443\u0436\u0435\u043d \u0431\u0443\u0434\u0435\u0442 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 GPU. <a href=\"https:\/\/colab.research.google.com\">\u0418\u0434\u0435\u043c \u0432 \u041a\u043e\u043b\u0430\u0431\u0443 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435<\/a>.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c\u0441\u044f \u043f\u043e \u043f\u043e\u0432\u043e\u0434\u0443 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0440\u0435\u0434\u0443. \u0412 \u043d\u0430\u0447\u0430\u043b\u0435 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/companies\/ppr\/articles\/802949\/\">\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u0436\u0435\u043b\u0435\u0437\u0435 \u0431\u0435\u0437 Midjourney<\/a> \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e, \u0447\u0442\u043e \u0438 \u043a\u0430\u043a \u043d\u0430\u0434\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u0438\u0434\u0442\u0438 \u0434\u0430\u043b\u044c\u0448\u0435.<\/p>\n<h3>Install<\/h3>\n<p>\u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438. \u041a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043f\u0443\u0441\u0442\u0443\u044e \u044f\u0447\u0435\u0439\u043a\u0443 \u0431\u043b\u043e\u043a\u043d\u043e\u0442\u0430:<\/p>\n<p><code>!pip install transformers timm einops -q<\/code><\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0432 \u044f\u0447\u0435\u0439\u043a\u0435. \u041d\u0430\u0432\u043e\u0434\u0438\u043c \u043a\u0443\u0440\u0441\u043e\u0440 \u043d\u0430 \u043a\u043e\u0434 \u0438 \u0436\u043c\u0435\u043c CTRL+ENTER, \u0438\u043b\u0438 \u0434\u043b\u044f \u043c\u0430\u043a\u043e\u0432 \u0421OMMAND+ENTER. \u0418\u043b\u0438 \u0436\u043c\u0435\u043c \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u0441\u043b\u0435\u0432\u0430 \u044f\u0447\u0435\u0439\u043a\u0438. \u0416\u0434\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f.<\/p>\n<h3>\u0418\u043c\u043f\u043e\u0440\u0442\u044b<\/h3>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u044f\u0447\u0435\u0439\u043a\u0443 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434:<\/p>\n<p><code>from transformers import AutoModelForCausalLM, AutoTokenizer<br \/> from PIL import Image<br \/> import torch<br \/> import locale<\/p>\n<p> locale.getpreferredencoding = lambda: \"UTF-8\"<\/p>\n<p> model_id = \"vikhyatk\/moondream2\"<br \/> revision = \"2024-03-05\"<\/code><\/p>\n<p> <code># Check if CUDA (GPU support) is available and then set the device to GPU or CPU<br \/> device = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")<\/code><\/p>\n<p> <code># Load the model and tokenizer<br \/> model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True, revision=revision).to(device)<br \/> tokenizer = AutoTokenizer.from_pretrained(model_id, revision=revision)<\/code><\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c. \u0416\u0434\u0435\u043c, \u043a\u043e\u0433\u0434\u0430 \u043a\u043e\u0434 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0441\u044f.<\/p>\n<p>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0430\u0441\u044c, \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435.<\/p>\n<h3>\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a<\/h3>\n<p>\u041d\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u0431\u0443\u0434\u0443\u0442 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438, \u0447\u0442\u043e\u0431\u044b \u0434\u0430\u0432\u0430\u0442\u044c \u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430 \u043e\u043f\u043e\u0437\u043d\u0430\u043d\u0438\u0435. \u0418\u0445 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 \u0441\u0440\u0435\u0434\u0435 \u0431\u043b\u043e\u043a\u043d\u043e\u0442\u0430, \u043d\u043e \u043e\u043d\u0438 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u043f\u0440\u043e\u043f\u0430\u0434\u0443\u0442. \u0415\u0441\u0442\u044c \u0441\u043f\u043e\u0441\u043e\u0431 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u043d\u0430 \u0413\u0443\u0433\u043b \u0414\u0438\u0441\u043a\u0435 \u0438 \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u043f\u043a\u0443 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043a \u0431\u043b\u043e\u043a\u043d\u043e\u0442\u0443 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0441\u0440\u0435\u0434\u044b. \u042d\u0442\u043e\u0433\u043e \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u043c. \u041f\u043e\u0441\u0442\u0443\u043f\u0438\u043c \u043f\u0440\u043e\u0449\u0435 \u2014 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435. \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c, \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<p><code>!wget -O image.jpg https:\/\/nukadeti.ru\/content\/images\/essence\/tale\/261\/1248.jpg<\/code><\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043a\u043e\u0434.<\/p>\n<h3>\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430<\/h3>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u043c\u044b \u0441\u043a\u0430\u0447\u0430\u043b\u0438.<\/p>\n<p>\u041a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434:<\/p>\n<p><code>image = Image.open('image.jpg') #<\/code>\u0435\u0441\u043b\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0430 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u043f\u0430\u043f\u043a\u0435 \u0441\u0440\u0435\u0434\u044b \u0431\u043b\u043e\u043a\u043d\u043e\u0442\u0430, \u0442\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u0443\u0442\u044c \u043a \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044e<br \/> <code>image<\/code><\/p>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u043c\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b\u0438:<\/p>\n<figure class=\"full-width\"><\/figure>\n<h3>\u0417\u0440\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044e \u0437\u0440\u0435\u043d\u0438\u044f \u0418\u0418.<\/p>\n<p>\u041a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u0432 \u043d\u043e\u0432\u0443\u044e \u044f\u0447\u0435\u0439\u043a\u0443<\/p>\n<p><code>image = Image.open('image.jpg') #path of the input image<\/p>\n<p> question = 'What do you see in the image?'<\/p>\n<p> enc_image = model.encode_image(image).to(device)<\/p>\n<p> # Generate the answer<br \/> answer = model.answer_question(enc_image, question, tokenizer)<\/p>\n<p> # If the output is a tensor, move it back to CPU for further operations like print<br \/> if isinstance(answer, torch.Tensor):<br \/> \u00a0\u00a0\u00a0 answer = answer.cpu()<\/p>\n<p> print(answer)<\/code><\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043a\u043e\u0434\u0435 \u0435\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <strong>question<\/strong>, c \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b. \u0418\u0445 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0435\u0451 \u0440\u043e\u0434\u043d\u043e\u043c \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0430 \u043d\u0430\u0441 \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u043b\u0430. \u042d\u0442\u043e \u043d\u0435\u0442\u0440\u0443\u0434\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/translate.google.com\">Google\u041f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a<\/a>.<\/p>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0443\u0437\u043d\u0430\u0442\u044c, \u0447\u0442\u043e \u0432\u0438\u0434\u0438\u0442 \u0418\u0418 \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435. \u0418\u0442\u0430\u043a, \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441: What do you see in the image?<\/p>\n<p><em>\u041f\u0435\u0440\u0435\u0432\u043e\u0434: \u0427\u0442\u043e \u0442\u044b \u0432\u0438\u0434\u0438\u0448\u044c \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435?<\/em><\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043a\u043e\u0434 \u0432 \u044f\u0447\u0435\u0439\u043a\u0435. \u041e\u0442\u0432\u0435\u0442 \u043c\u043e\u0434\u0435\u043b\u0438 \u0442\u0430\u043a\u043e\u0439: A painting is depicted in this image, featuring a rabbit, a fox, and another animal. The animals are seated on a bench, with a wooden house in the background. The ground is covered with grass.<\/p>\n<p><em>\u041f\u0435\u0440\u0435\u0432\u043e\u0434: \u041d\u0430 \u044d\u0442\u043e\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u0430, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u044b \u043a\u0440\u043e\u043b\u0438\u043a, \u043b\u0438\u0441\u0430 \u0438 \u0435\u0449\u0435 \u043e\u0434\u043d\u043e \u0436\u0438\u0432\u043e\u0442\u043d\u043e\u0435. \u0416\u0438\u0432\u043e\u0442\u043d\u044b\u0435 \u0441\u0438\u0434\u044f\u0442 \u043d\u0430 \u0441\u043a\u0430\u043c\u0435\u0439\u043a\u0435 \u043d\u0430 \u0444\u043e\u043d\u0435 \u0434\u0435\u0440\u0435\u0432\u044f\u043d\u043d\u043e\u0433\u043e \u0434\u043e\u043c\u0430. \u0417\u0435\u043c\u043b\u044f \u043f\u043e\u043a\u0440\u044b\u0442\u0430 \u0442\u0440\u0430\u0432\u043e\u0439.<\/em><\/p>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c \u043d\u0435 \u0443\u0432\u0435\u0440\u0435\u043d\u0430, \u0447\u0442\u043e \u0437\u0430 \u0442\u0440\u0435\u0442\u0438\u0439 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436 \u0432 \u044d\u0442\u043e\u043c \u0441\u044e\u0436\u0435\u0442\u0435. \u0417\u0430\u0434\u0430\u0434\u0438\u043c \u0443\u0442\u043e\u0447\u043d\u044f\u044e\u0449\u0438\u0439 \u0432\u043e\u043f\u0440\u043e\u0441: Who is depicted sitting on the bench next to the fox?<\/p>\n<p><em>\u041f\u0435\u0440\u0435\u0432\u043e\u0434: \u041a\u0442\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d \u0441\u0438\u0434\u044f\u0449\u0438\u043c \u043d\u0430 \u0441\u043a\u0430\u043c\u0435\u0439\u043a\u0435 \u0440\u044f\u0434\u043e\u043c \u0441 \u043b\u0438\u0441\u043e\u0439?<\/em><\/p>\n<p>\u041f\u0440\u043e\u0441\u0442\u043e \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u043d\u0430 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <strong>question<\/strong> \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043a\u043e\u0434 \u0432 \u044f\u0447\u0435\u0439\u043a\u0435.<\/p>\n<p><em>\u041e\u0442\u0432\u0435\u0442<\/em>: A cat is depicted sitting on a bench next to a fox.<\/p>\n<p><em>\u041f\u0435\u0440\u0435\u0432\u043e\u0434: \u041a\u043e\u0442 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d \u0441\u0438\u0434\u044f\u0449\u0438\u043c \u043d\u0430 \u0441\u043a\u0430\u043c\u0435\u0439\u043a\u0435 \u0440\u044f\u0434\u043e\u043c \u0441 \u043b\u0438\u0441\u043e\u0439.<\/em><\/p>\n<p>\u0412\u0435\u0440\u043d\u043e!<\/p>\n<p>\u0421\u043f\u0440\u043e\u0441\u0438\u043c \u0432\u043e\u0442 \u0447\u0442\u043e: Which of the characters depicted is the smallest?<\/p>\n<p><em>\u041f\u0435\u0440\u0435\u0432\u043e\u0434: \u041a\u0430\u043a\u043e\u0439 \u0438\u0437 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044b\u0445 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0435\u0439 \u0441\u0430\u043c\u044b\u0439 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439?<\/em><\/p>\n<p><em>\u041e\u0442\u0432\u0435\u0442<\/em>: The smallest character is a rabbit, depicted in a grey outfit and standing in front of a house. The other two characters are a fox and a cat, also present in the house.<\/p>\n<p><em>\u041f\u0435\u0440\u0435\u0432\u043e\u0434: \u0421\u0430\u043c\u044b\u0439 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436 \u2014 \u043a\u0440\u043e\u043b\u0438\u043a, \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044b\u0439 \u0432 \u0441\u0435\u0440\u043e\u043c \u043d\u0430\u0440\u044f\u0434\u0435 \u0438 \u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u043f\u0435\u0440\u0435\u0434 \u0434\u043e\u043c\u043e\u043c. \u0414\u0432\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0430 \u2014 \u043b\u0438\u0441\u0430 \u0438 \u043a\u043e\u0442, \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0432 \u0434\u043e\u043c\u0435.<\/em><\/p>\n<p>\u0421 \u0446\u0432\u0435\u0442\u043e\u043c \u043d\u0430\u0440\u044f\u0434\u0430 \u0437\u0430\u0439\u0446\u0430-\u043a\u0440\u043e\u043b\u0438\u043a\u0430 \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0441\u043e\u0433\u043b\u0430\u0441\u0438\u0442\u044c\u0441\u044f. \u041d\u043e \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u043b\u043e\u0448\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u0438 \u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c. \u041e\u043d\u0430 \u0443 \u043d\u0430\u0441 \u0442\u043e\u0436\u0435 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0430\u044f :).<\/p>\n<p>\u0411\u0443\u0434\u0435\u043c \u0443\u0442\u043e\u0447\u043d\u044f\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435. What color are the cat&#8217;s pants?<\/p>\n<p><em>\u041f\u0435\u0440\u0435\u0432\u043e\u0434: \u041a\u0430\u043a\u043e\u0433\u043e \u0446\u0432\u0435\u0442\u0430 \u0448\u0442\u0430\u043d\u044b \u0443 \u043a\u043e\u0442\u0430?<\/em><\/p>\n<p><em>\u041e\u0442\u0432\u0435\u0442<\/em>: Green<\/p>\n<p><em>\u041f\u0435\u0440\u0435\u0432\u043e\u0434: \u0417\u0435\u043b\u0435\u043d\u044b\u0439<\/em><\/p>\n<p>What color is the bunny&#8217;s shirt?<\/p>\n<p><em>\u041f\u0435\u0440\u0435\u0432\u043e\u0434: \u041a\u0430\u043a\u043e\u0433\u043e \u0446\u0432\u0435\u0442\u0430 \u0440\u0443\u0431\u0430\u0448\u043a\u0430 \u0443 \u0437\u0430\u0439\u0447\u0438\u043a\u0430?<\/em><\/p>\n<p><em>\u041e\u0442\u0432\u0435\u0442<\/em>: Orange<\/p>\n<p><em>\u041f\u0435\u0440\u0435\u0432\u043e\u0434: \u041e\u0440\u0430\u043d\u0436\u0435\u0432\u044b\u0439<\/em><\/p>\n<p>\u041d\u0435\u043f\u043b\u043e\u0445\u043e.<\/p>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u0434\u0430\u0434\u0438\u043c \u0432\u043e\u043f\u0440\u043e\u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0440\u0443\u0433\u043e\u0439, \u043f\u043e\u0441\u0435\u0440\u044c\u0435\u0437\u043d\u0435\u0435.<\/p>\n<p>Is there a threat to the hare in this image?<\/p>\n<p><em>\u041f\u0435\u0440\u0435\u0432\u043e\u0434: \u0415\u0441\u0442\u044c \u043b\u0438 \u0443\u0433\u0440\u043e\u0437\u0430 \u0434\u043b\u044f \u0437\u0430\u0439\u0446\u0430 \u043d\u0430 \u044d\u0442\u043e\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438?<\/em><\/p>\n<p><em>\u041e\u0442\u0432\u0435\u0442<\/em>: No, there is no threat to the hare in this image. The scene features a cat and a fox sitting on a bench, while a rabbit is standing nearby. The rabbit is not in any immediate danger, and there is no indication that predators are present.<\/p>\n<p><em>\u041f\u0435\u0440\u0435\u0432\u043e\u0434: \u041d\u0435\u0442, \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0443\u0433\u0440\u043e\u0437\u044b \u0437\u0430\u0439\u0446\u0443 \u043d\u0430 \u044d\u0442\u043e\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438 \u043d\u0435\u0442. \u0412 \u0441\u0446\u0435\u043d\u0435 \u043a\u043e\u0442 \u0438 \u043b\u0438\u0441\u0430 \u0441\u0438\u0434\u044f\u0442 \u043d\u0430 \u0441\u043a\u0430\u043c\u0435\u0439\u043a\u0435, \u0430 \u0440\u044f\u0434\u043e\u043c \u0441\u0442\u043e\u0438\u0442 \u043a\u0440\u043e\u043b\u0438\u043a. \u041a\u0440\u043e\u043b\u0438\u043a\u0443 \u043d\u0435 \u0433\u0440\u043e\u0437\u0438\u0442 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c, \u0438 \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u0445\u0438\u0449\u043d\u0438\u043a\u043e\u0432.<\/em><\/p>\n<p>\u0417\u0430\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u0445\u0438\u0449\u043d\u0438\u043a\u0438-\u0442\u043e \u0435\u0441\u0442\u044c, \u043d\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u043b\u0438\u0441\u044b \u043a\u0430\u043a \u0434\u0440\u0443\u0436\u0435\u043b\u044e\u0431\u043d\u043e\u0435, \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043d\u0435\u0441\u0442\u0438 \u0435\u0435 \u043a \u0445\u0438\u0449\u043d\u0438\u043a\u0443 \u2014 \u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044e \u0443\u0433\u0440\u043e\u0437\u044b \u0434\u043b\u044f \u0437\u0430\u0439\u0446\u0430. \u0425\u043e\u0442\u044f \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u0418\u0418 \u043e\u0448\u0438\u0431\u0441\u044f \u0432 \u0434\u0435\u0442\u0430\u043b\u044f\u0445, \u043d\u043e \u043f\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443 \u0432\u043e\u043f\u0440\u043e\u0441\u0430 \u043e\u0442\u0432\u0435\u0442\u0438\u043b \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e. \u0417\u0430\u0449\u0438\u0449\u0430\u0442\u044c \u0435\u0433\u043e \u043c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c, \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u043a\u0440\u043e\u0448\u0435\u0447\u043d\u0430\u044f, \u0447\u0442\u043e \u0438 \u0442\u0430\u043a\u043e\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0434\u043b\u044f \u043d\u0435\u0435 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0433\u0435\u043d\u0438\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<h3>\u0417\u0430\u0434\u0430\u043d\u0438\u0435 \u0441\u043e \u0437\u0432\u0435\u0437\u0434\u043e\u0447\u043a\u043e\u0439<\/h3>\n<p>\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u0434\u0440\u0443\u0433\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435.<\/p>\n<p><code>!wget -O image.jpg https:\/\/cdnn21.img.ria.ru\/images\/15580\/75\/155807501_0:0:0:0_600x0_80_0_0_257bb0d3ef49560de8ae7109d11ec9f1.jpg<\/code><\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b\u0438<\/p>\n<p><code>image = Image.open('image.jpg') #path of the input image<br \/> image<\/code><\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0422\u0430\u043a\u0430\u044f \u0432\u043e\u0442 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430. \u042d\u0442\u043e \u0443\u0436\u0435 \u043d\u0435 \u0441\u043a\u0430\u0437\u043a\u0438.<\/p>\n<p>\u0421\u043f\u0440\u043e\u0441\u0438\u043c \u0443 \u043c\u043e\u0434\u0435\u043b\u0438, \u0447\u0442\u043e \u043e\u043d\u0430 \u0432\u0438\u0434\u0438\u0442, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0430\u043a\u043e\u0433\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u0430: Describe the signs of aggression in the image, if any.<\/p>\n<p><em>\u041f\u0435\u0440\u0435\u0432\u043e\u0434: \u041e\u043f\u0438\u0448\u0438\u0442\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u0430\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u043d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438, \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0435\u0441\u0442\u044c.<\/em><\/p>\n<p><em>\u041e\u0442\u0432\u0435\u0442<\/em>: In the center of the image, a group of people are engaged in a fight. One individual is holding a flag, while another person is holding a drum. The background features buildings, trees, and additional people, along with a road.<\/p>\n<p><em>\u041f\u0435\u0440\u0435\u0432\u043e\u0434: \u0412 \u0446\u0435\u043d\u0442\u0440\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0433\u0440\u0443\u043f\u043f\u0430 \u043b\u044e\u0434\u0435\u0439 \u0432\u0435\u0434\u0435\u0442 \u0434\u0440\u0430\u043a\u0443. \u041e\u0434\u0438\u043d \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0434\u0435\u0440\u0436\u0438\u0442 \u0444\u043b\u0430\u0433, \u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u0434\u0435\u0440\u0436\u0438\u0442 \u0431\u0430\u0440\u0430\u0431\u0430\u043d. \u041d\u0430 \u0437\u0430\u0434\u043d\u0435\u043c \u043f\u043b\u0430\u043d\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u044b \u0437\u0434\u0430\u043d\u0438\u044f, \u0434\u0435\u0440\u0435\u0432\u044c\u044f \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043b\u044e\u0434\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u0440\u043e\u0433\u0430.<\/em><\/p>\n<h3>\u0413\u0438\u0444\u043a\u0438<\/h3>\n<p>\u0414\u0430\u043d\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u044b\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u043d\u043e \u0438 \u0433\u0438\u0444\u043a\u0438. \u0414\u043e\u043b\u0433\u043e \u043d\u0430 \u044d\u0442\u043e\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0441\u0442\u0430\u043d\u0435\u043c. \u041f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043a\u0430\u0436\u0435\u043c, \u0447\u0442\u043e \u044d\u0442\u043e \u0442\u043e\u0436\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e.<\/p>\n<p>\u0421\u043a\u0430\u0447\u0430\u0435\u043c \u0433\u0438\u0444\u043a\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0430\u043a\u043e\u0433\u043e \u043a\u043e\u0434\u0430.<\/p>\n<p><code>!wget -O tenor.gif https:\/\/media1.tenor.com\/m\/ZuAyMucnnJEAAAAC\/spongebob-squarepants.gif<\/code><\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u043c\u044b \u0441\u043a\u0430\u0447\u0430\u043b\u0438. \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434.<\/p>\n<p>\u00a0<code># Load the GIF file<br \/> gif_path = 'tenor.gif'\u00a0 # Replace with your gif path<br \/> gif = Image.open(gif_path)<br \/> gif<\/code><\/p>\n<figure class=\"\"><\/figure>\n<p>\u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u0434 \u0432 \u043d\u043e\u0432\u0443\u044e \u044f\u0447\u0435\u0439\u043a\u0443 \u0434\u043b\u044f \u043f\u043e\u043a\u0430\u0434\u0440\u043e\u0432\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0433\u0438\u0444\u043e\u043a. \u0413\u0438\u0444\u043a\u0430 \u2014 \u044d\u0442\u043e \u0442\u043e\u0436\u0435 \u0432\u0438\u0434\u0435\u043e, \u043d\u043e \u0441 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0439 \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439 \u043a\u0430\u0434\u0440\u043e\u0432. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0438\u0434\u0435\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e. \u041d\u043e \u0442\u0443\u0442 \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0437\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438. \u041e\u0434\u043d\u043e \u0434\u0435\u043b\u043e \u2014 \u043e\u0434\u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430, \u0434\u0440\u0443\u0433\u043e\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, 24 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443. \u0422.\u0435. \u044d\u0442\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0430 \u043e\u0434\u043d\u0443 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u0432\u0438\u0434\u0435\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u043e 24 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438. \u042d\u0442\u043e \u0434\u043e\u043b\u0433\u043e. \u041d\u0443\u0436\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0436\u0435\u043b\u0435\u0437\u0430, \u0447\u0435\u043c \u043c\u044b \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442.<\/p>\n<p>\u041a\u043e\u0434:<\/p>\n<p><code># Load the GIF file<br \/> gif_path = 'tenor.gif'\u00a0 # Replace with your gif path<br \/> gif = Image.open(gif_path)<\/p>\n<p> question = \"Which character is in the image?\"<\/p>\n<p> frame_count = 0<br \/> answers = []<\/p>\n<p> while True:<br \/> \u00a0\u00a0\u00a0 try:<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # Seek to the next frame<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 gif.seek(frame_count)<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # Process every 5th frame<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 if frame_count % 10 == 0:<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # Convert the frame to a format compatible with the model<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 frame = gif.convert('RGB')<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # Process the frame with the model<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 enc_image = model.encode_image(frame).to(device)<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 answer = model.answer_question(enc_image, question, tokenizer)<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 if isinstance(answer, torch.Tensor):<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 answer = answer.cpu()<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # Append the answer<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 answers.append(answer)<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 frame_count += 1<br \/> \u00a0\u00a0\u00a0 except EOFError:<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # Exit the loop when the end of the GIF is reached<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 break<\/p>\n<p> # Concatenate and print all answers<br \/> all_answers = '\\n'.join(answers)<br \/> print(all_answers)<\/code><\/p>\n<p>\u0412\u043e\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430:<\/p>\n<p>Which character is in the image?<\/p>\n<p>What is the character in the image doing?<\/p>\n<p>What is the text at the bottom of the image?<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u0434\u0430\u0435\u043c \u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0438. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043e\u0442\u0432\u0435\u0442\u044b. <em>\u042d\u0442\u043e \u0413\u0443\u0431\u043a\u0430\u0411\u043e\u0431. \u041f\u0435\u0440\u0441\u043e\u043d\u0430\u0436 \u043d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438 \u0441\u0442\u043e\u0438\u0442 \u0438, \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u0441 \u0443\u043b\u044b\u0431\u043a\u043e\u0439 \u043d\u0430 \u043b\u0438\u0446\u0435. \u041d\u0430 \u0437\u0430\u0434\u043d\u0435\u043c \u043f\u043b\u0430\u043d\u0435 \u0435\u0441\u0442\u044c \u0442\u0435\u043a\u0441\u0442. \u041d\u0430\u0434\u043f\u0438\u0441\u044c \u043d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438 \u0433\u043b\u0430\u0441\u0438\u0442: Happy April Fool&#8217;s Day!<\/em><\/p>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u0430\u0434\u0440\u0430. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043e\u0431\u0449\u0435\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0432\u0438\u0434\u0435\u043e, \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0432\u0441\u0435 \u043e\u0442\u0432\u0435\u0442\u044b \u044d\u0442\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432 \u0434\u0440\u0443\u0433\u0443\u044e \u0434\u043b\u044f \u0441\u0430\u043c\u043c\u0430\u0440\u0438\u0437\u0430\u0446\u0438\u0438. \u041d\u043e \u044d\u0442\u043e \u0442\u0435\u043c\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438.<\/p>\n<h3>\u0418\u0418-\u0445\u0443\u0434\u043e\u0436\u043d\u0438\u043a<\/h3>\n<p>\u041f\u0440\u0438\u043a\u043e\u0441\u043d\u0435\u043c\u0441\u044f \u043a \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0441\u043a\u0440\u044b\u0442\u044b\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 &#171;\u0433\u043e\u043b\u043e\u0432\u0435&#187; \u043c\u0430\u0448\u0438\u043d\u044b, \u043d\u043e \u0441\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0438 \u0443 \u043b\u044e\u0434\u0435\u0439.<\/p>\n<p>\u0421\u043a\u0430\u0447\u0430\u0435\u043c \u0434\u0440\u0443\u0433\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443:<\/p>\n<p><code>!wget -O image.jpg https:\/\/pentaschool.ru\/upload_2\/Dizajn-detskoj.jpg<\/code><\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c<\/p>\n<p><code>image = Image.open('image.jpg') #path of the input image<br \/> image<\/code><\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041c\u0438\u043b\u043e\u0442\u0430.<\/p>\n<p>\u041c\u044b \u0443\u0441\u043b\u043e\u0436\u043d\u0438\u043c \u0437\u0430\u0434\u0430\u0447\u0443 \u0438 \u0437\u0430\u0434\u0430\u0434\u0438\u043c \u043d\u0435 \u043e\u0434\u0438\u043d-\u0434\u0432\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u0430, \u0430 \u0441\u0440\u0430\u0437\u0443 \u0441\u0435\u0440\u0438\u044e \u0441 \u0443\u0442\u043e\u0447\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u0434\u0435\u0442\u0430\u043b\u0435\u0439. \u0411\u0443\u0434\u0435\u043c \u043d\u0430\u0440\u0430\u0449\u0438\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0445 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0439 \u0441 \u043d\u0438\u043c. \u041f\u043e\u0437\u0436\u0435 \u043c\u044b \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0443\u0432\u0438\u0434\u0435\u043d\u043d\u043e\u0435 \u043d\u0430 \u044d\u0442\u043e\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435. \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0435\u0451 \u0445\u0443\u0434\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u043d\u043e\u0432\u043e\u0439 \u044f\u0447\u0435\u0439\u043a\u0435:<\/p>\n<p><code>questions = '''What do you see in the image?<br \/> Describe the child's appearance?<br \/> Describe the child's face?<br \/> Describe the child's hair?<br \/><\/code><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-373134","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/373134","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=373134"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/373134\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=373134"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=373134"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=373134"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}