 We want an application that can answer questions about an image. For example, how many people are in this photo?\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Natural Language Processing Text Classification\', \'framework\': \'Hugging Face Transformers\', \'functionality\': \'Information Retrieval\', \'api_name\': \'cross-encoder/ms-marco-TinyBERT-L-2-v2\', \'api_call\': "AutoModelForSequenceClassification.from_pretrained(\'cross-encoder/ms-marco-TinyBERT-L-2-v2\')", \'api_arguments\': {\'tokenizer\': "tokenizer = AutoTokenizer.from_pretrained(\'model_name\')", \'features\': "features = tokenizer([\'How many people live in Berlin?\', \'How many people live in Berlin?\'], [\'Berlin has a population of 3,520,031 registered inhabitants in an area of 891.82 square kilometers.\', \'New York City is famous for the Metropolitan Museum of Art.\'], padding=True, truncation=True, return_tensors=\'pt\')"}, \'python_environment_requirements\': [\'transformers\', \'torch\'], \'example_code\': {\'import\': \'from transformers import AutoTokenizer, AutoModelForSequenceClassification\', \'model\': "model = AutoModelForSequenceClassification.from_pretrained(\'model_name\')", \'tokenizer\': "tokenizer = AutoTokenizer.from_pretrained(\'model_name\')", \'features\': "features = tokenizer([\'How many people live in Berlin?\', \'How many people live in Berlin?\'], [\'Berlin has a population of 3,520,031 registered inhabitants in an area of 891.82 square kilometers.\', \'New York City is famous for the Metropolitan Museum of Art.\'], padding=True, truncation=True, return_tensors=\'pt\')", \'scores\': \'with torch.no_grad():\\n    scores = model(**features).logits\\n    print(scores)\'}, \'performance\': {\'dataset\': \'TREC Deep Learning 2019\', \'accuracy\': \'69.84 (NDCG@10)\'}, \'description\': \'This model was trained on the MS Marco Passage Ranking task. It can be used for Information Retrieval: Given a query, encode the query with all possible passages (e.g. retrieved with ElasticSearch). Then sort the passages in a decreasing order. The training code is available here: SBERT.net Training MS Marco.\'}', metadata={})]


 I am developing a home security software which can detect intruders entering the house. In case any door or object is tampered, the application will ask, \"Who entered the room?\", to assist quick analysis of the CCTV recordings.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Computer Vision Object Detection\', \'framework\': \'Hugging Face Transformers\', \'functionality\': \'Object Detection\', \'api_name\': \'hustvl/yolos-tiny\', \'api_call\': "YolosForObjectDetection.from_pretrained(\'hustvl/yolos-tiny\')", \'api_arguments\': {\'images\': \'image\', \'return_tensors\': \'pt\'}, \'python_environment_requirements\': [\'transformers\', \'PIL\', \'requests\'], \'example_code\': "from transformers import YolosFeatureExtractor, YolosForObjectDetection\\nfrom PIL import Image\\nimport requests\\nurl = \'http://images.cocodataset.org/val2017/000000039769.jpg\'\\nimage = Image.open(requests.get(url, stream=True).raw)\\nfeature_extractor = YolosFeatureExtractor.from_pretrained(\'hustvl/yolos-tiny\')\\nmodel = YolosForObjectDetection.from_pretrained(\'hustvl/yolos-tiny\')\\ninputs = feature_extractor(images=image, return_tensors=pt)\\noutputs = model(**inputs)\\nlogits = outputs.logits\\nbboxes = outputs.pred_boxes", \'performance\': {\'dataset\': \'COCO 2017 validation\', \'accuracy\': \'28.7 AP\'}, \'description\': \'YOLOS is a Vision Transformer (ViT) trained using the DETR loss. Despite its simplicity, a base-sized YOLOS model is able to achieve 42 AP on COCO validation 2017 (similar to DETR and more complex frameworks such as Faster R-CNN). The model is trained using a bipartite matching loss: one compares the predicted classes + bounding boxes of each of the N = 100 object queries to the ground truth annotations, padded up to the same length N (so if an image only contains 4 objects, 96 annotations will just have a no object as class and no bounding box as bounding box). The Hungarian matching algorithm is used to create an optimal one-to-one mapping between each of the N queries and each of the N annotations. Next, standard cross-entropy (for the classes) and a linear combination of the L1 and generalized IoU loss (for the bounding boxes) are used to optimize the parameters of the model.\'}', metadata={})]


 Our business is growing rapidly, and we've received an increasing number of questions related to product images. We need the model to provide answers based on images.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Natural Language Processing Conversational\', \'framework\': \'Hugging Face Transformers\', \'functionality\': \'Transformers\', \'api_name\': \'hyunwoongko/blenderbot-9B\', \'api_call\': "pipeline(\'conversational\', model=\'hyunwoongko/blenderbot-9B\')", \'api_arguments\': \'text\', \'python_environment_requirements\': \'transformers\', \'example_code\': \'Input a message to start chatting with hyunwoongko/blenderbot-9B.\', \'performance\': {\'dataset\': \'blended_skill_talk\', \'accuracy\': \'Not provided\'}, \'description\': \'Building open-domain chatbots is a challenging area for machine learning research. While prior work has shown that scaling neural models in the number of parameters and the size of the data they are trained on gives improved results, we show that other ingredients are important for a high-performing chatbot. Good conversation requires a number of skills that an expert conversationalist blends in a seamless way: providing engaging talking points and listening to their partners, both asking and answering questions, and displaying knowledge, empathy and personality appropriately, depending on the situation. We show that large scale models can learn these skills when given appropriate training data and choice of generation strategy. We build variants of these recipes with 90M, 2.7B and 9.4B parameter neural models, and make our models and code publicly available. Human evaluations show our best models are superior to existing approaches in multi-turn dialogue in terms of engagingness and humanness measurements. We then discuss the limitations of this work by analyzing failure cases of our models.\'}', metadata={})]


 Our company receives invoices in different formats. We need to extract specific information from these documents to process payments and keep records.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Natural Language Processing Conversational\', \'framework\': \'Hugging Face Transformers\', \'functionality\': \'Transformers\', \'api_name\': \'hyunwoongko/blenderbot-9B\', \'api_call\': "pipeline(\'conversational\', model=\'hyunwoongko/blenderbot-9B\')", \'api_arguments\': \'text\', \'python_environment_requirements\': \'transformers\', \'example_code\': \'Input a message to start chatting with hyunwoongko/blenderbot-9B.\', \'performance\': {\'dataset\': \'blended_skill_talk\', \'accuracy\': \'Not provided\'}, \'description\': \'Building open-domain chatbots is a challenging area for machine learning research. While prior work has shown that scaling neural models in the number of parameters and the size of the data they are trained on gives improved results, we show that other ingredients are important for a high-performing chatbot. Good conversation requires a number of skills that an expert conversationalist blends in a seamless way: providing engaging talking points and listening to their partners, both asking and answering questions, and displaying knowledge, empathy and personality appropriately, depending on the situation. We show that large scale models can learn these skills when given appropriate training data and choice of generation strategy. We build variants of these recipes with 90M, 2.7B and 9.4B parameter neural models, and make our models and code publicly available. Human evaluations show our best models are superior to existing approaches in multi-turn dialogue in terms of engagingness and humanness measurements. We then discuss the limitations of this work by analyzing failure cases of our models.\'}', metadata={})]


 Design an AI algorithm to answer questions from scanned documents.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Multimodal Visual Question Answering\', \'framework\': \'Hugging Face Transformers\', \'functionality\': \'Transformers\', \'api_name\': \'vilt-finetuned-vqasi\', \'api_call\': "ViltModel.from_pretrained(\'tufa15nik/vilt-finetuned-vqasi\')", \'api_arguments\': {\'model\': \'tufa15nik/vilt-finetuned-vqasi\', \'tokenizer\': \'tufa15nik/vilt-finetuned-vqasi\'}, \'python_environment_requirements\': {\'transformers\': \'>=4.11.3\'}, \'example_code\': \'\', \'performance\': {\'dataset\': \'\', \'accuracy\': \'\'}, \'description\': \'A Visual Question Answering model fine-tuned on the VQASI dataset by tufa15nik using the ViLT architecture. The model is designed to answer questions based on the content of an input image.\'}', metadata={})]


 I want to analyze the text and images in a document and extract answers to questions based on the content.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Multimodal Document Question Answer\', \'framework\': \'Hugging Face Transformers\', \'functionality\': \'Transformers\', \'api_name\': \'LayoutLMX_pt_question_answer_ocrazure_correct_V15_30_03_2023\', \'api_call\': "AutoModelForDocumentQuestionAnswering.from_pretrained(\'L-oenai/LayoutLMX_pt_question_answer_ocrazure_correct_V15_30_03_2023\')", \'api_arguments\': {}, \'python_environment_requirements\': {\'transformers\': \'>=4.11.0\'}, \'example_code\': {}, \'performance\': {\'dataset\': {}, \'accuracy\': {}}, \'description\': \'A document question answering model based on LayoutLMv2, which can be used to extract answers from images with text and layout information.\'}', metadata={})]


 Locate specific information from an invoice image, such as total amount due, invoice number, and due date.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Multimodal Document Question Answer\', \'framework\': \'Hugging Face Transformers\', \'functionality\': \'Document Question Answering\', \'api_name\': \'CQI_Visual_Question_Awnser_PT_v0\', \'api_call\': "pipeline(\'question-answering\', model=LayoutLMForQuestionAnswering.from_pretrained(\'microsoft/layoutlm-base-uncased\'))", \'api_arguments\': [\'url\', \'question\'], \'python_environment_requirements\': [\'PIL\', \'pytesseract\', \'PyTorch\', \'transformers\'], \'example_code\': ["nlp(\'https://templates.invoicehome.com/invoice-template-us-neat-750px.png\', \'What is the invoice number?\')", "nlp(\'https://miro.medium.com/max/787/1*iECQRIiOGTmEFLdWkVIH2g.jpeg\', \'What is the purchase amount?\')", "nlp(\'https://www.accountingcoach.com/wp-content/uploads/2013/10/income-statement-example@2x.png\', \'What are the 2020 net sales?\')"], \'performance\': {\'dataset\': [{\'accuracy\': 0.9943977}, {\'accuracy\': 0.9912159}, {\'accuracy\': 0.59147286}]}, \'description\': \'A model for visual question answering in Portuguese and English, capable of processing PDFs and images to extract information and answer questions.\'}', metadata={})]


 The company director needs a summary of a recent financial report. You should provide the answer of following question: What were the total revenues for the last quarter?\n###Input: In the last quarter, the company's total revenues were reported at $3.2 million with a gross profit of $1.5 million. The operating expenses during the same quarter were $1 million.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Natural Language Processing Summarization\', \'framework\': \'Transformers\', \'functionality\': \'text2text-generation\', \'api_name\': \'csebuetnlp/mT5_multilingual_XLSum\', \'api_call\': "AutoModelForSeq2SeqLM.from_pretrained(\'csebuetnlp/mT5_multilingual_XLSum\')", \'api_arguments\': [\'model_name\'], \'python_environment_requirements\': [\'transformers==4.11.0.dev0\'], \'example_code\': "import re\\nfrom transformers import AutoTokenizer, AutoModelForSeq2SeqLM\\nWHITESPACE_HANDLER = lambda k: re.sub(\'\\\\s+\', \' \', re.sub(\'\\\\n+\', \' \', k.strip()))\\narticle_text = Videos that say approved vaccines are dangerous and cause autism, cancer or infertility are among those that will be taken down, the company said. The policy includes the termination of accounts of anti-vaccine influencers. Tech giants have been criticised for not doing more to counter false health information on their sites. In July, US President Joe Biden said social media platforms were largely responsible for people\'s scepticism in getting vaccinated by spreading misinformation, and appealed for them to address the issue. YouTube, which is owned by Google, said 130,000 videos were removed from its platform since last year, when it implemented a ban on content spreading misinformation about Covid vaccines. In a blog post, the company said it had seen false claims about Covid jabs spill over into misinformation about vaccines in general. The new policy covers long-approved vaccines, such as those against measles or hepatitis B. We\'re expanding our medical misinformation policies on YouTube with new guidelines on currently administered vaccines that are approved and confirmed to be safe and effective by local health authorities and the WHO, the post said, referring to the World Health Organization.\\nmodel_name = csebuetnlp/mT5_multilingual_XLSum\\ntokenizer = AutoTokenizer.from_pretrained(model_name)\\nmodel = AutoModelForSeq2SeqLM.from_pretrained(model_name)\\ninput_ids = tokenizer(\\n [WHITESPACE_HANDLER(article_text)],\\n return_tensors=pt,\\n padding=max_length,\\n truncation=True,\\n max_length=512\\n)[input_ids]\\noutput_ids = model.generate(\\n input_ids=input_ids,\\n max_length=84,\\n no_repeat_ngram_size=2,\\n num_beams=4\\n)[0]\\nsummary = tokenizer.decode(\\n output_ids,\\n skip_special_tokens=True,\\n clean_up_tokenization_spaces=False\\n)\\nprint(summary)", \'performance\': {\'dataset\': \'xsum\', \'accuracy\': {\'ROUGE-1\': 36.5, \'ROUGE-2\': 13.934, \'ROUGE-L\': 28.988, \'ROUGE-LSUM\': 28.996, \'loss\': 2.067, \'gen_len\': 26.973}}, \'description\': \'This repository contains the mT5 checkpoint finetuned on the 45 languages of XL-Sum dataset. It is a multilingual abstractive summarization model that supports text-to-text generation for 43 languages.\'}', metadata={})]


 You must create a tool to assess safety risks automatically in construction sites by estimating the distance of tools and workers.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Computer Vision Object Detection\', \'framework\': \'Hugging Face Transformers\', \'functionality\': \'Object Detection\', \'api_name\': \'keremberke/yolov8m-hard-hat-detection\', \'api_call\': "YOLO(\'keremberke/yolov8m-hard-hat-detection\')", \'api_arguments\': {\'image\': \'URL or local path to the image\'}, \'python_environment_requirements\': [\'ultralyticsplus==0.0.24\', \'ultralytics==8.0.23\'], \'example_code\': "from ultralyticsplus import YOLO, render_result\\n\\nmodel = YOLO(\'keremberke/yolov8m-hard-hat-detection\')\\n\\nmodel.overrides[\'conf\'] = 0.25\\nmodel.overrides[\'iou\'] = 0.45\\nmodel.overrides[\'agnostic_nms\'] = False\\nmodel.overrides[\'max_det\'] = 1000\\n\\nimage = \'https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg\'\\n\\nresults = model.predict(image)\\n\\nprint(results[0].boxes)\\nrender = render_result(model=model, image=image, result=results[0])\\nrender.show()", \'performance\': {\'dataset\': \'hard-hat-detection\', \'accuracy\': 0.811}, \'description\': "A YOLOv8 model for detecting hard hats in images. The model can distinguish between \'Hardhat\' and \'NO-Hardhat\' classes. It can be used to ensure safety compliance in construction sites or other industrial environments where hard hats are required."}', metadata={})]


 Develop a solution to estimate the depth of objects in an image.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Natural Language Processing Text Classification\', \'framework\': \'Hugging Face Transformers\', \'functionality\': \'Information Retrieval\', \'api_name\': \'cross-encoder/ms-marco-TinyBERT-L-2-v2\', \'api_call\': "AutoModelForSequenceClassification.from_pretrained(\'cross-encoder/ms-marco-TinyBERT-L-2-v2\')", \'api_arguments\': {\'tokenizer\': "tokenizer = AutoTokenizer.from_pretrained(\'model_name\')", \'features\': "features = tokenizer([\'How many people live in Berlin?\', \'How many people live in Berlin?\'], [\'Berlin has a population of 3,520,031 registered inhabitants in an area of 891.82 square kilometers.\', \'New York City is famous for the Metropolitan Museum of Art.\'], padding=True, truncation=True, return_tensors=\'pt\')"}, \'python_environment_requirements\': [\'transformers\', \'torch\'], \'example_code\': {\'import\': \'from transformers import AutoTokenizer, AutoModelForSequenceClassification\', \'model\': "model = AutoModelForSequenceClassification.from_pretrained(\'model_name\')", \'tokenizer\': "tokenizer = AutoTokenizer.from_pretrained(\'model_name\')", \'features\': "features = tokenizer([\'How many people live in Berlin?\', \'How many people live in Berlin?\'], [\'Berlin has a population of 3,520,031 registered inhabitants in an area of 891.82 square kilometers.\', \'New York City is famous for the Metropolitan Museum of Art.\'], padding=True, truncation=True, return_tensors=\'pt\')", \'scores\': \'with torch.no_grad():\\n    scores = model(**features).logits\\n    print(scores)\'}, \'performance\': {\'dataset\': \'TREC Deep Learning 2019\', \'accuracy\': \'69.84 (NDCG@10)\'}, \'description\': \'This model was trained on the MS Marco Passage Ranking task. It can be used for Information Retrieval: Given a query, encode the query with all possible passages (e.g. retrieved with ElasticSearch). Then sort the passages in a decreasing order. The training code is available here: SBERT.net Training MS Marco.\'}', metadata={})]


 We need to analyze some pictures from nature and classify them to protect some species of animals.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Natural Language Processing Text2Text Generation\', \'framework\': \'Hugging Face Transformers\', \'functionality\': \'Paraphrasing\', \'api_name\': \'prithivida/parrot_paraphraser_on_T5\', \'api_call\': "Parrot(model_tag=\'prithivida/parrot_paraphraser_on_T5\', use_gpu=False)", \'api_arguments\': [\'input_phrase\', \'diversity_ranker\', \'do_diverse\', \'max_return_phrases\', \'max_length\', \'adequacy_threshold\', \'fluency_threshold\'], \'python_environment_requirements\': [\'torch\', \'transformers\'], \'example_code\': \'from parrot import Parrot\\nimport torch\\nimport warnings\\nwarnings.filterwarnings(ignore)\\n\\nparrot = Parrot(model_tag=prithivida/parrot_paraphraser_on_T5, use_gpu=False)\\nphrases = [Can you recommed some upscale restaurants in Newyork?,\\n What are the famous places we should not miss in Russia?\\n]\\nfor phrase in phrases:\\n print(-*100)\\n print(Input_phrase: , phrase)\\n print(-*100)\\n para_phrases = parrot.augment(input_phrase=phrase)\\n for para_phrase in para_phrases:\\n  print(para_phrase)\', \'performance\': {\'dataset\': \'Not mentioned\', \'accuracy\': \'Not mentioned\'}, \'description\': \'Parrot is a paraphrase based utterance augmentation framework purpose built to accelerate training NLU models. It offers knobs to control Adequacy, Fluency, and Diversity as per your needs. It mainly focuses on augmenting texts typed-into or spoken-to conversational interfaces for building robust NLU models.\'}', metadata={})]


 We need to detect objects in an image provided by a user and describe their locations.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Computer Vision Object Detection\', \'framework\': \'Transformers\', \'functionality\': \'Object Detection\', \'api_name\': \'fcakyon/yolov5s-v7.0\', \'api_call\': "yolov5.load(\'fcakyon/yolov5s-v7.0\')", \'api_arguments\': {\'conf\': 0.25, \'iou\': 0.45, \'agnostic\': False, \'multi_label\': False, \'max_det\': 1000, \'img\': \'https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg\', \'size\': 640, \'augment\': True}, \'python_environment_requirements\': \'pip install -U yolov5\', \'example_code\': "import yolov5\\nmodel = yolov5.load(\'fcakyon/yolov5s-v7.0\')\\nmodel.conf = 0.25\\nmodel.iou = 0.45\\nmodel.agnostic = False\\nmodel.multi_label = False\\nmodel.max_det = 1000\\nimg = \'https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg\'\\nresults = model(img)\\nresults = model(img, size=640)\\nresults = model(img, augment=True)\\npredictions = results.pred[0]\\nboxes = predictions[:, :4]\\nscores = predictions[:, 4]\\ncategories = predictions[:, 5]\\nresults.show()\\nresults.save(save_dir=\'results/\')", \'performance\': {\'dataset\': \'detection-datasets/coco\', \'accuracy\': None}, \'description\': \'Yolov5s-v7.0 is an object detection model trained on the COCO dataset. It can detect objects in images and return their bounding boxes, scores, and categories.\'}', metadata={})]


 We are creating an analysis platform for Counter-Strike: Global Offensive. Detect and locate players in the given image.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Natural Language Processing Conversational\', \'framework\': \'Hugging Face Transformers\', \'functionality\': \'Transformers\', \'api_name\': \'hyunwoongko/blenderbot-9B\', \'api_call\': "pipeline(\'conversational\', model=\'hyunwoongko/blenderbot-9B\')", \'api_arguments\': \'text\', \'python_environment_requirements\': \'transformers\', \'example_code\': \'Input a message to start chatting with hyunwoongko/blenderbot-9B.\', \'performance\': {\'dataset\': \'blended_skill_talk\', \'accuracy\': \'Not provided\'}, \'description\': \'Building open-domain chatbots is a challenging area for machine learning research. While prior work has shown that scaling neural models in the number of parameters and the size of the data they are trained on gives improved results, we show that other ingredients are important for a high-performing chatbot. Good conversation requires a number of skills that an expert conversationalist blends in a seamless way: providing engaging talking points and listening to their partners, both asking and answering questions, and displaying knowledge, empathy and personality appropriately, depending on the situation. We show that large scale models can learn these skills when given appropriate training data and choice of generation strategy. We build variants of these recipes with 90M, 2.7B and 9.4B parameter neural models, and make our models and code publicly available. Human evaluations show our best models are superior to existing approaches in multi-turn dialogue in terms of engagingness and humanness measurements. We then discuss the limitations of this work by analyzing failure cases of our models.\'}', metadata={})]


 Build an AI model that can recognize the objects in a given image and draw a boundary around them.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Multimodal Image-to-Text\', \'framework\': \'Hugging Face Transformers\', \'functionality\': \'Transformers\', \'api_name\': \'promptcap-coco-vqa\', \'api_call\': "PromptCap(\'vqascore/promptcap-coco-vqa\')", \'api_arguments\': {\'prompt\': \'string\', \'image\': \'string\'}, \'python_environment_requirements\': \'pip install promptcap\', \'example_code\': [\'import torch\', \'from promptcap import PromptCap\', \'model = PromptCap(vqascore/promptcap-coco-vqa)\', \'if torch.cuda.is_available():\', \'  model.cuda()\', \'prompt = please describe this image according to the given question: what piece of clothing is this boy putting on?\', \'image = glove_boy.jpeg\', \'print(model.caption(prompt, image))\'], \'performance\': {\'dataset\': {\'coco\': {\'accuracy\': \'150 CIDEr\'}, \'OK-VQA\': {\'accuracy\': \'60.4%\'}, \'A-OKVQA\': {\'accuracy\': \'59.6%\'}}}, \'description\': \'PromptCap is a captioning model that can be controlled by natural language instruction. The instruction may contain a question that the user is interested in. It achieves SOTA performance on COCO captioning (150 CIDEr) and knowledge-based VQA tasks when paired with GPT-3 (60.4% on OK-VQA and 59.6% on A-OKVQA).\'}', metadata={})]


 Design a pipeline to create artistic variations of an input image.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Computer Vision Image-to-Image\', \'framework\': \'Hugging Face\', \'functionality\': \'Image Variations\', \'api_name\': \'lambdalabs/sd-image-variations-diffusers\', \'api_call\': "StableDiffusionImageVariationPipeline.from_pretrained(\'lambdalabs/sd-image-variations-diffusers\', revision=\'v2.0\')", \'api_arguments\': {\'revision\': \'v2.0\'}, \'python_environment_requirements\': \'Diffusers >=0.8.0\', \'example_code\': \'from diffusers import StableDiffusionImageVariationPipeline\\nfrom PIL import Image\\ndevice = cuda:0\\nsd_pipe = StableDiffusionImageVariationPipeline.from_pretrained(\\n lambdalabs/sd-image-variations-diffusers,\\n revision=v2.0,\\n)\\nsd_pipe = sd_pipe.to(device)\\nim = Image.open(path/to/image.jpg)\\ntform = transforms.Compose([\\n transforms.ToTensor(),\\n transforms.Resize(\\n  (224, 224),\\n  interpolation=transforms.InterpolationMode.BICUBIC,\\n  antialias=False,\\n ),\\n transforms.Normalize(\\n  [0.48145466, 0.4578275, 0.40821073],\\n  [0.26862954, 0.26130258, 0.27577711]),\\n])\\ninp = tform(im).to(device).unsqueeze(0)\\nout = sd_pipe(inp, guidance_scale=3)\\nout[images][0].save(result.jpg)\', \'performance\': {\'dataset\': \'ChristophSchuhmann/improved_aesthetics_6plus\', \'accuracy\': \'N/A\'}, \'description\': \'This version of Stable Diffusion has been fine tuned from CompVis/stable-diffusion-v1-4-original to accept CLIP image embedding rather than text embeddings. This allows the creation of image variations similar to DALLE-2 using Stable Diffusion.\'}', metadata={})]


 A user wants to improve the quality of a small sized picture from her vacation. We need to upscale the picture to 2x its size without losing quality.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Multimodal Feature Extraction\', \'framework\': \'Hugging Face Transformers\', \'functionality\': \'Transformers\', \'api_name\': \'facebook/dragon-plus-context-encoder\', \'api_call\': "AutoModel.from_pretrained(\'facebook/dragon-plus-context-encoder\')", \'api_arguments\': [\'pretrained\'], \'python_environment_requirements\': [\'torch\', \'transformers\'], \'example_code\': "import torch\\nfrom transformers import AutoTokenizer, AutoModel\\ntokenizer = AutoTokenizer.from_pretrained(\'facebook/dragon-plus-query-encoder\')\\nquery_encoder = AutoModel.from_pretrained(\'facebook/dragon-plus-query-encoder\')\\ncontext_encoder = AutoModel.from_pretrained(\'facebook/dragon-plus-context-encoder\')\\nquery = \'Where was Marie Curie born?\'\\ncontexts = [\\n  \'Maria Sklodowska, later known as Marie Curie, was born on November 7, 1867.\',\\n  \'Born in Paris on 15 May 1859, Pierre Curie was the son of Eugène Curie, a doctor of French Catholic origin from Alsace.\'\\n]\\nquery_input = tokenizer(query, return_tensors=\'pt\')\\nctx_input = tokenizer(contexts, padding=True, truncation=True, return_tensors=\'pt\')\\nquery_emb = query_encoder(query_input).last_hidden_state[:, 0, :]\\nctx_emb = context_encoder(ctx_input).last_hidden_state[:, 0, :]\\nscore1 = query_emb @ ctx_emb[0]\\nscore2 = query_emb @ ctx_emb[1]", \'performance\': {\'dataset\': \'MS MARCO\', \'accuracy\': 39.0}, \'description\': \'DRAGON+ is a BERT-base sized dense retriever initialized from RetroMAE and further trained on the data augmented from MS MARCO corpus, following the approach described in How to Train Your DRAGON: Diverse Augmentation Towards Generalizable Dense Retrieval. The associated GitHub repository is available here https://github.com/facebookresearch/dpr-scale/tree/main/dragon. We use asymmetric dual encoder, with two distinctly parameterized encoders.\'}', metadata={})]


 I want to create a visual representation based on a short description: \"A magical forest with unicorns and a rainbow.\".\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Multimodal Text-to-Image\', \'framework\': \'Hugging Face\', \'functionality\': \'Text-to-Image\', \'api_name\': \'gsdf/Counterfeit-V2.5\', \'api_call\': "pipeline(\'text-to-image\', model=\'gsdf/Counterfeit-V2.5\')", \'api_arguments\': \'text\', \'python_environment_requirements\': \'transformers\', \'example_code\': \'((masterpiece,best quality)),1girl, solo, animal ears, rabbit, barefoot, knees up, dress, sitting, rabbit ears, short sleeves, looking at viewer, grass, short hair, smile, white hair, puffy sleeves, outdoors, puffy short sleeves, bangs, on ground, full body, animal, white dress, sunlight, brown eyes, dappled sunlight, day, depth of field\', \'performance\': {\'dataset\': \'EasyNegative\', \'accuracy\': \'Not provided\'}, \'description\': \'Counterfeit-V2.5 is a text-to-image model that generates anime-style images based on text prompts. It has been updated for ease of use and can be used with negative prompts to create high-quality images.\'}', metadata={})]


 Explain how to use GPT-3 to create a slogan for an e-commerce website that sells eco-friendly products.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Computer Vision Video Classification\', \'framework\': \'Hugging Face Transformers\', \'functionality\': \'Video Classification\', \'api_name\': \'videomae-small-finetuned-ssv2\', \'api_call\': "VideoMAEForVideoClassification.from_pretrained(\'MCG-NJU/videomae-small-finetuned-ssv2\')", \'api_arguments\': {\'model_name\': \'MCG-NJU/videomae-small-finetuned-ssv2\'}, \'python_environment_requirements\': {\'transformers\': \'from transformers import VideoMAEFeatureExtractor, VideoMAEForVideoClassification\', \'numpy\': \'import numpy as np\', \'torch\': \'import torch\'}, \'example_code\': \'video = list(np.random.randn(16, 3, 224, 224))\\nfeature_extractor = VideoMAEFeatureExtractor.from_pretrained(MCG-NJU/videomae-small-finetuned-ssv2)\\nmodel = VideoMAEForVideoClassification.from_pretrained(MCG-NJU/videomae-small-finetuned-ssv2)\\ninputs = feature_extractor(video, return_tensors=pt)\\nwith torch.no_grad():\\n  outputs = model(**inputs)\\n  logits = outputs.logits\\npredicted_class_idx = logits.argmax(-1).item()\\nprint(Predicted class:, model.config.id2label[predicted_class_idx])\', \'performance\': {\'dataset\': \'Something-Something V2\', \'accuracy\': {\'top-1\': 66.8, \'top-5\': 90.3}}, \'description\': \'VideoMAE is an extension of Masked Autoencoders (MAE) to video. The architecture of the model is very similar to that of a standard Vision Transformer (ViT), with a decoder on top for predicting pixel values for masked patches. Videos are presented to the model as a sequence of fixed-size patches (resolution 16x16), which are linearly embedded. One also adds a [CLS] token to the beginning of a sequence to use it for classification tasks. One also adds fixed sinus/cosinus position embeddings before feeding the sequence to the layers of the Transformer encoder. By pre-training the model, it learns an inner representation of videos that can then be used to extract features useful for downstream tasks: if you have a dataset of labeled videos for instance, you can train a standard classifier by placing a linear layer on top of the pre-trained encoder. One typically places a linear layer on top of the [CLS] token, as the last hidden state of this token can be seen as a representation of an entire video.\'}', metadata={})]


 I'm working on a project that requires generating high-quality images of faces for a set of characters in a video game.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Multimodal Text-to-Image\', \'framework\': \'Hugging Face\', \'functionality\': \'Text-to-Image Generation\', \'api_name\': \'stabilityai/stable-diffusion-2-1\', \'api_call\': "StableDiffusionPipeline.from_pretrained(\'stabilityai/stable-diffusion-2-1\', torch_dtype=torch.float16)", \'api_arguments\': {\'prompt\': \'a photo of an astronaut riding a horse on mars\'}, \'python_environment_requirements\': [\'diffusers\', \'transformers\', \'accelerate\', \'scipy\', \'safetensors\'], \'example_code\': \'from diffusers import StableDiffusionPipeline, DPMSolverMultistepScheduler\\nmodel_id = stabilityai/stable-diffusion-2-1\\npipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)\\npipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)\\npipe = pipe.to(cuda)\\nprompt = a photo of an astronaut riding a horse on mars\\nimage = pipe(prompt).images[0]\\nimage.save(astronaut_rides_horse.png)\', \'performance\': {\'dataset\': \'COCO2017\', \'accuracy\': \'Not optimized for FID scores\'}, \'description\': \'Stable Diffusion v2-1 is a diffusion-based text-to-image generation model developed by Robin Rombach and Patrick Esser. It is capable of generating and modifying images based on text prompts in English. The model is trained on a subset of the LAION-5B dataset and is primarily intended for research purposes.\'}', metadata={})]


 Our client wants to analyze videos for their marketing website. They need a quick solution to categorize video content without worrying about accuracy.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Natural Language Processing Summarization\', \'framework\': \'Transformers\', \'functionality\': \'text2text-generation\', \'api_name\': \'csebuetnlp/mT5_multilingual_XLSum\', \'api_call\': "AutoModelForSeq2SeqLM.from_pretrained(\'csebuetnlp/mT5_multilingual_XLSum\')", \'api_arguments\': [\'model_name\'], \'python_environment_requirements\': [\'transformers==4.11.0.dev0\'], \'example_code\': "import re\\nfrom transformers import AutoTokenizer, AutoModelForSeq2SeqLM\\nWHITESPACE_HANDLER = lambda k: re.sub(\'\\\\s+\', \' \', re.sub(\'\\\\n+\', \' \', k.strip()))\\narticle_text = Videos that say approved vaccines are dangerous and cause autism, cancer or infertility are among those that will be taken down, the company said. The policy includes the termination of accounts of anti-vaccine influencers. Tech giants have been criticised for not doing more to counter false health information on their sites. In July, US President Joe Biden said social media platforms were largely responsible for people\'s scepticism in getting vaccinated by spreading misinformation, and appealed for them to address the issue. YouTube, which is owned by Google, said 130,000 videos were removed from its platform since last year, when it implemented a ban on content spreading misinformation about Covid vaccines. In a blog post, the company said it had seen false claims about Covid jabs spill over into misinformation about vaccines in general. The new policy covers long-approved vaccines, such as those against measles or hepatitis B. We\'re expanding our medical misinformation policies on YouTube with new guidelines on currently administered vaccines that are approved and confirmed to be safe and effective by local health authorities and the WHO, the post said, referring to the World Health Organization.\\nmodel_name = csebuetnlp/mT5_multilingual_XLSum\\ntokenizer = AutoTokenizer.from_pretrained(model_name)\\nmodel = AutoModelForSeq2SeqLM.from_pretrained(model_name)\\ninput_ids = tokenizer(\\n [WHITESPACE_HANDLER(article_text)],\\n return_tensors=pt,\\n padding=max_length,\\n truncation=True,\\n max_length=512\\n)[input_ids]\\noutput_ids = model.generate(\\n input_ids=input_ids,\\n max_length=84,\\n no_repeat_ngram_size=2,\\n num_beams=4\\n)[0]\\nsummary = tokenizer.decode(\\n output_ids,\\n skip_special_tokens=True,\\n clean_up_tokenization_spaces=False\\n)\\nprint(summary)", \'performance\': {\'dataset\': \'xsum\', \'accuracy\': {\'ROUGE-1\': 36.5, \'ROUGE-2\': 13.934, \'ROUGE-L\': 28.988, \'ROUGE-LSUM\': 28.996, \'loss\': 2.067, \'gen_len\': 26.973}}, \'description\': \'This repository contains the mT5 checkpoint finetuned on the 45 languages of XL-Sum dataset. It is a multilingual abstractive summarization model that supports text-to-text generation for 43 languages.\'}', metadata={})]


 I want to classify images of vehicles including cars, motorcycles, trucks, and bicycles, based on their appearance.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Natural Language Processing Conversational\', \'framework\': \'Hugging Face Transformers\', \'functionality\': \'text-generation\', \'api_name\': \'pygmalion-2.7b\', \'api_call\': "pipeline(\'text-generation\', model=\'PygmalionAI/pygmalion-2.7b\')", \'api_arguments\': {\'input_prompt\': \'string\'}, \'python_environment_requirements\': {\'transformers\': \'latest\'}, \'example_code\': "model([CHARACTER]\'s Persona: [A few sentences about the character you want the model to play]<START>[DIALOGUE HISTORY]You: [Your input message here][CHARACTER]:)", \'performance\': {\'dataset\': \'56MB of dialogue data\', \'accuracy\': \'N/A\'}, \'description\': "Pygmalion 2.7B is a proof-of-concept dialogue model based on EleutherAI\'s gpt-neo-2.7B. It is fine-tuned on 56MB of dialogue data gathered from multiple sources, including real and partially machine-generated conversations. The model is intended for use in generating conversational responses and can be used with a specific input format that includes character persona, dialogue history, and user input message."}', metadata={})]


 I need to classify images of animals into their specific categories.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Computer Vision Zero-Shot Image Classification\', \'framework\': \'Hugging Face\', \'functionality\': \'Zero-Shot Image Classification\', \'api_name\': \'laion/CLIP-ViT-g-14-laion2B-s34B-b88K\', \'api_call\': "pipeline(\'zero-shot-image-classification\', model=\'laion/CLIP-ViT-g-14-laion2B-s34B-b88K\')", \'api_arguments\': {\'image\': \'path/to/image/file\', \'class_names\': \'list_of_class_names\'}, \'python_environment_requirements\': {\'huggingface_hub\': \'0.0.17\', \'transformers\': \'4.11.3\', \'torch\': \'1.9.0\', \'torchvision\': \'0.10.0\'}, \'example_code\': None, \'performance\': {\'dataset\': None, \'accuracy\': None}, \'description\': \'A zero-shot image classification model based on OpenCLIP, which can classify images into various categories without requiring any training data for those categories.\'}', metadata={})]


 We are building a location recommendation system that identifies possible locations for new stores based on images from potential locations. Use the StreetCLIP model to generate probabilities for various cities.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Audio Automatic Speech Recognition\', \'framework\': \'Hugging Face Transformers\', \'functionality\': \'Transformers\', \'api_name\': \'jbetker/wav2vec2-large-robust-ft-libritts-voxpopuli\', \'api_call\': "Wav2Vec2ForCTC.from_pretrained(\'jbetker/wav2vec2-large-robust-ft-libritts-voxpopuli\')", \'api_arguments\': \'\', \'python_environment_requirements\': \'transformers\', \'example_code\': \'https://github.com/neonbjb/ocotillo\', \'performance\': {\'dataset\': \'librispeech validation set\', \'accuracy\': \'4.45%\'}, \'description\': \'This checkpoint is a wav2vec2-large model that is useful for generating transcriptions with punctuation. It is intended for use in building transcriptions for TTS models, where punctuation is very important for prosody. This model was created by fine-tuning the facebook/wav2vec2-large-robust-ft-libri-960h checkpoint on the libritts and voxpopuli datasets with a new vocabulary that includes punctuation.\'}', metadata={})]


 We are receiving mixed reviews about our new product and we need to understand customers' reactions.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Natural Language Processing Conversational\', \'framework\': \'Hugging Face Transformers\', \'functionality\': \'Transformers\', \'api_name\': \'hyunwoongko/blenderbot-9B\', \'api_call\': "pipeline(\'conversational\', model=\'hyunwoongko/blenderbot-9B\')", \'api_arguments\': \'text\', \'python_environment_requirements\': \'transformers\', \'example_code\': \'Input a message to start chatting with hyunwoongko/blenderbot-9B.\', \'performance\': {\'dataset\': \'blended_skill_talk\', \'accuracy\': \'Not provided\'}, \'description\': \'Building open-domain chatbots is a challenging area for machine learning research. While prior work has shown that scaling neural models in the number of parameters and the size of the data they are trained on gives improved results, we show that other ingredients are important for a high-performing chatbot. Good conversation requires a number of skills that an expert conversationalist blends in a seamless way: providing engaging talking points and listening to their partners, both asking and answering questions, and displaying knowledge, empathy and personality appropriately, depending on the situation. We show that large scale models can learn these skills when given appropriate training data and choice of generation strategy. We build variants of these recipes with 90M, 2.7B and 9.4B parameter neural models, and make our models and code publicly available. Human evaluations show our best models are superior to existing approaches in multi-turn dialogue in terms of engagingness and humanness measurements. We then discuss the limitations of this work by analyzing failure cases of our models.\'}', metadata={})]


Detect if there are any harmful messages in a chat room.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Natural Language Processing Conversational\', \'framework\': \'Hugging Face Transformers\', \'functionality\': \'Transformers\', \'api_name\': \'ToddGoldfarb/Cadet-Tiny\', \'api_call\': "AutoModelForSeq2SeqLM.from_pretrained(\'ToddGoldfarb/Cadet-Tiny\', low_cpu_mem_usage=True)", \'api_arguments\': {\'pretrained_model\': \'t5-small\', \'model_max_length\': 512}, \'python_environment_requirements\': {\'torch\': \'\', \'transformers\': \'\', \'colorful\': \'\'}, \'example_code\': "import torch\\nfrom transformers import AutoTokenizer, AutoModelForSeq2SeqLM\\nimport colorful as cf\\ncf.use_true_colors()\\ncf.use_style(\'monokai\')\\nclass CadetTinyAgent:\\n def init(self):\\n  print(cf.bold | cf.purple(Waking up Cadet-Tiny...))\\n  self.device = torch.device(cuda if torch.cuda.is_available() else cpu)\\n  self.tokenizer = AutoTokenizer.from_pretrained(t5-small, model_max_length=512)\\n  self.model = AutoModelForSeq2SeqLM.from_pretrained(ToddGoldfarb/Cadet-Tiny, low_cpu_mem_usage=True).to(self.device)\\n  self.conversation_history = \\ndef observe(self, observation):\\n self.conversation_history = self.conversation_history + observation\\n # The number 400 below is just a truncation safety net. It leaves room for 112 input tokens.\\n if len(self.conversation_history) > 400:\\n self.conversation_history = self.conversation_history[112:]\\ndef set_input(self, situation_narrative=, role_instruction=):\\n input_text = dialogue: \\n if situation_narrative != :\\n input_text = input_text + situation_narrative\\n if role_instruction != :\\n input_text = input_text +  <SEP>  + role_instruction\\n input_text = input_text +  <TURN>  + self.conversation_history\\n # Uncomment the line below to see what is fed to the model.\\n # print(input_text)\\n return input_text\\ndef generate(self, situation_narrative, role_instruction, user_response):\\n user_response = user_response +  <TURN> \\n self.observe(user_response)\\n input_text = self.set_input(situation_narrative, role_instruction)\\n inputs = self.tokenizer([input_text], return_tensors=pt).to(self.device)\\n # I encourage you to change the hyperparameters of the model! Start by trying to modify the temperature.\\n outputs = self.model.generate(inputs[input_ids], max_new_tokens=512, temperature=1, top_p=.95,\\n do_sample=True)\\n cadet_response = self.tokenizer.decode(outputs[0], skip_special_tokens=True, clean_up_tokenization_spaces=False)\\n added_turn = cadet_response +  <TURN> \\n self.observe(added_turn)\\n return cadet_response\\ndef reset_history(self):\\n self.conversation_history = []\\ndef run(self):\\n def get_valid_input(prompt, default):\\n  while True:\\n   user_input = input(prompt)\\n   if user_input in [Y, N, y, n]:\\n    return user_input\\n   if user_input == :\\n    return default\\n  while True:\\n   continue_chat = \\n   # MODIFY THESE STRINGS TO YOUR LIKING :)\\n   situation_narrative = Imagine you are Cadet-Tiny talking to ???.\\n   role_instruction = You are Cadet-Tiny, and you are talking to ???.\\n   self.chat(situation_narrative, role_instruction)\\n   continue_chat = get_valid_input(cf.purple(Start a new conversation with new setup? [Y/N]:), Y)\\n   if continue_chat in [N, n]:\\n    break\\n   print(cf.blue(CT: See you!))\\ndef chat(self, situation_narrative, role_instruction):\\n print(cf.green(\\n  Cadet-Tiny is running! Input [RESET] to reset the conversation history and [END] to end the conversation.))\\n while True:\\n  user_input = input(You: )\\n  if user_input == [RESET]:\\n   self.reset_history()\\n   print(cf.green([Conversation history cleared. Chat with Cadet-Tiny!]))\\n   continue\\n  if user_input == [END]:\\n   break\\n  response = self.generate(situation_narrative, role_instruction, user_input)\\n  print(cf.blue(CT:  + response))\\ndef main():\\n print(cf.bold | cf.blue(LOADING MODEL))\\nCadetTiny = CadetTinyAgent()\\nCadetTiny.run()\\nif name == \'main\':\\n main()", \'performance\': {\'dataset\': \'allenai/soda\', \'accuracy\': \'\'}, \'description\': \'Cadet-Tiny is a very small conversational model trained off of the SODA dataset. Cadet-Tiny is intended for inference at the edge (on something as small as a 2GB RAM Raspberry Pi). Cadet-Tiny is trained off of the t5-small pretrained model from Google, and is, as a result, is about 2% of the size of the Cosmo-3B model.\'}', metadata={})]


 I am developing software that needs to retrieve relevant information from a collection of documents based on a user's query.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Natural Language Processing Text2Text Generation\', \'framework\': \'Transformers\', \'functionality\': \'Sentence Correction\', \'api_name\': \'flexudy/t5-base-multi-sentence-doctor\', \'api_call\': "AutoModelWithLMHead.from_pretrained(\'flexudy/t5-base-multi-sentence-doctor\')", \'api_arguments\': [\'input_text\'], \'python_environment_requirements\': [\'transformers\'], \'example_code\': \'from transformers import AutoTokenizer, AutoModelWithLMHead\\ntokenizer = AutoTokenizer.from_pretrained(flexudy/t5-base-multi-sentence-doctor)\\nmodel = AutoModelWithLMHead.from_pretrained(flexudy/t5-base-multi-sentence-doctor)\\ninput_text = repair_sentence: m a medical doct context: {That is my job I a}{or I save lives} </s>\\ninput_ids = tokenizer.encode(input_text, return_tensors=pt)\\noutputs = model.generate(input_ids, max_length=32, num_beams=1)\\nsentence = tokenizer.decode(outputs[0], skip_special_tokens=True, clean_up_tokenization_spaces=True)\\nassert sentence == I am a medical doctor.\', \'performance\': {\'dataset\': \'tatoeba\', \'accuracy\': \'Not specified\'}, \'description\': \'Sentence doctor is a T5 model that attempts to correct the errors or mistakes found in sentences. Model works on English, German and French text.\'}', metadata={})]


 Our client is a media organization that wants to extract named entities from a large collection of news articles in order to identify key people and places\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Natural Language Processing Token Classification\', \'framework\': \'Flair\', \'functionality\': \'Named Entity Recognition\', \'api_name\': \'flair/ner-english-ontonotes-large\', \'api_call\': "SequenceTagger.load(\'flair/ner-english-ontonotes-large\')", \'api_arguments\': [\'sentence\'], \'python_environment_requirements\': [\'flair\'], \'example_code\': "from flair.data import Sentence\\nfrom flair.models import SequenceTagger\\n\\n# load tagger\\ntagger = SequenceTagger.load(\'flair/ner-english-ontonotes-large\')\\n\\n# make example sentence\\nsentence = Sentence(\'On September 1st George won 1 dollar while watching Game of Thrones.\')\\n\\n# predict NER tags\\ntagger.predict(sentence)\\n\\n# print sentence\\nprint(sentence)\\n\\n# print predicted NER spans\\nprint(\'The following NER tags are found:\')\\n\\n# iterate over entities and print\\nfor entity in sentence.get_spans(\'ner\'):\\n    print(entity)", \'performance\': {\'dataset\': \'Ontonotes\', \'accuracy\': 90.93}, \'description\': \'English NER in Flair (Ontonotes large model). This is the large 18-class NER model for English that ships with Flair. It predicts 18 tags such as cardinal value, date value, event name, building name, geo-political entity, language name, law name, location name, money name, affiliation, ordinal value, organization name, percent value, person name, product name, quantity value, time value, and name of work of art. The model is based on document-level XLM-R embeddings and FLERT.\'}', metadata={})]


 Extract entities from a provided sentence mentioning various companies and their CEOs.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Natural Language Processing Token Classification\', \'framework\': \'Hugging Face Transformers\', \'functionality\': \'Named Entity Recognition\', \'api_name\': \'Jean-Baptiste/camembert-ner\', \'api_call\': "AutoModelForTokenClassification.from_pretrained(\'Jean-Baptiste/camembert-ner\')", \'api_arguments\': {\'model\': \'model\', \'tokenizer\': \'tokenizer\', \'aggregation_strategy\': \'simple\'}, \'python_environment_requirements\': {\'transformers\': \'AutoTokenizer, AutoModelForTokenClassification, pipeline\'}, \'example_code\': "from transformers import AutoTokenizer, AutoModelForTokenClassification\\ntokenizer = AutoTokenizer.from_pretrained(Jean-Baptiste/camembert-ner)\\nmodel = AutoModelForTokenClassification.from_pretrained(Jean-Baptiste/camembert-ner)\\n\\nfrom transformers import pipeline\\nnlp = pipeline(\'ner\', model=model, tokenizer=tokenizer, aggregation_strategy=simple)\\nnlp(Apple est cre le 1er avril 1976 dans le garage de la maison d\'enfance de Steve Jobs  Los Altos en Californie par Steve Jobs, Steve Wozniak et Ronald Wayne14, puis constitue sous forme de socit le 3 janvier 1977  l\'origine sous le nom d\'Apple Computer, mais pour ses 30 ans et pour reflter la diversification de ses produits, le mot « computer  est retir le 9 janvier 2015.)", \'performance\': {\'dataset\': \'wikiner-fr\', \'accuracy\': {\'overall_f1\': 0.8914, \'PER_f1\': 0.9483, \'ORG_f1\': 0.8181, \'LOC_f1\': 0.8955, \'MISC_f1\': 0.8146}}, \'description\': \'camembert-ner is a Named Entity Recognition (NER) model fine-tuned from camemBERT on the wikiner-fr dataset. It can recognize entities such as persons, organizations, locations, and miscellaneous entities.\'}', metadata={})]


 I am developing a food application where food keywords need to be extracted from user's input text. The model should be able to recognize food-related named entities.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Natural Language Processing Token Classification\', \'framework\': \'Transformers\', \'functionality\': \'Named Entity Recognition\', \'api_name\': \'Dizex/InstaFoodRoBERTa-NER\', \'api_call\': "AutoModelForTokenClassification.from_pretrained(\'Dizex/InstaFoodRoBERTa-NER\')", \'api_arguments\': {\'model\': "AutoModelForTokenClassification.from_pretrained(\'Dizex/InstaFoodRoBERTa-NER\')", \'tokenizer\': "AutoTokenizer.from_pretrained(\'Dizex/InstaFoodRoBERTa-NER\')"}, \'python_environment_requirements\': {\'transformers\': \'from transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline\'}, \'example_code\': "example = Today\'s meal: Fresh olive pok bowl topped with chia seeds. Very delicious!\\nner_entity_results = pipe(example, aggregation_strategy=\'simple\')\\nprint(ner_entity_results)", \'performance\': {\'dataset\': \'Dizex/InstaFoodSet\', \'accuracy\': {\'f1\': 0.91, \'precision\': 0.89, \'recall\': 0.93}}, \'description\': \'InstaFoodRoBERTa-NER is a fine-tuned BERT model that is ready to use for Named Entity Recognition of Food entities on informal text (social media like). It has been trained to recognize a single entity: food (FOOD). Specifically, this model is a roberta-base model that was fine-tuned on a dataset consisting of 400 English Instagram posts related to food.\'}', metadata={})]


 Create a script for an AI bot that automatically adds punctuation to users' messages in a chat app.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Computer Vision Video Classification\', \'framework\': \'Hugging Face Transformers\', \'functionality\': \'Video Classification\', \'api_name\': \'videomae-small-finetuned-ssv2\', \'api_call\': "VideoMAEForVideoClassification.from_pretrained(\'MCG-NJU/videomae-small-finetuned-ssv2\')", \'api_arguments\': {\'model_name\': \'MCG-NJU/videomae-small-finetuned-ssv2\'}, \'python_environment_requirements\': {\'transformers\': \'from transformers import VideoMAEFeatureExtractor, VideoMAEForVideoClassification\', \'numpy\': \'import numpy as np\', \'torch\': \'import torch\'}, \'example_code\': \'video = list(np.random.randn(16, 3, 224, 224))\\nfeature_extractor = VideoMAEFeatureExtractor.from_pretrained(MCG-NJU/videomae-small-finetuned-ssv2)\\nmodel = VideoMAEForVideoClassification.from_pretrained(MCG-NJU/videomae-small-finetuned-ssv2)\\ninputs = feature_extractor(video, return_tensors=pt)\\nwith torch.no_grad():\\n  outputs = model(**inputs)\\n  logits = outputs.logits\\npredicted_class_idx = logits.argmax(-1).item()\\nprint(Predicted class:, model.config.id2label[predicted_class_idx])\', \'performance\': {\'dataset\': \'Something-Something V2\', \'accuracy\': {\'top-1\': 66.8, \'top-5\': 90.3}}, \'description\': \'VideoMAE is an extension of Masked Autoencoders (MAE) to video. The architecture of the model is very similar to that of a standard Vision Transformer (ViT), with a decoder on top for predicting pixel values for masked patches. Videos are presented to the model as a sequence of fixed-size patches (resolution 16x16), which are linearly embedded. One also adds a [CLS] token to the beginning of a sequence to use it for classification tasks. One also adds fixed sinus/cosinus position embeddings before feeding the sequence to the layers of the Transformer encoder. By pre-training the model, it learns an inner representation of videos that can then be used to extract features useful for downstream tasks: if you have a dataset of labeled videos for instance, you can train a standard classifier by placing a linear layer on top of the pre-trained encoder. One typically places a linear layer on top of the [CLS] token, as the last hidden state of this token can be seen as a representation of an entire video.\'}', metadata={})]


 I am writing an article on the history of technology companies, and I want to extract the names of companies and people mentioned in the text.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Natural Language Processing Summarization\', \'framework\': \'Hugging Face Transformers\', \'functionality\': \'text2text-generation\', \'api_name\': \'tuner007/pegasus_summarizer\', \'api_call\': "PegasusForConditionalGeneration.from_pretrained(\'tuner007/pegasus_summarizer\')", \'api_arguments\': [\'input_text\'], \'python_environment_requirements\': [\'pip install sentencepiece\'], \'example_code\': "context = \\nIndia wicket-keeper batsman Rishabh Pant has said someone from the crowd threw a ball on pacer Mohammed Siraj while he was fielding in the ongoing third Test against England on Wednesday. Pant revealed the incident made India skipper Virat Kohli upset. I think, somebody threw a ball inside, at Siraj, so he [Kohli] was upset, said Pant in a virtual press conference after the close of the first day\'s play.You can say whatever you want to chant, but don\'t throw things at the fielders and all those things. It is not good for cricket, I guess, he added.In the third session of the opening day of the third Test, a section of spectators seemed to have asked Siraj the score of the match to tease the pacer. The India pacer however came with a brilliant reply as he gestured 1-0 (India leading the Test series) towards the crowd.Earlier this month, during the second Test match, there was some bad crowd behaviour on a show as some unruly fans threw champagne corks at India batsman KL Rahul.Kohli also intervened and he was seen gesturing towards the opening batsman to know more about the incident. An over later, the TV visuals showed that many champagne corks were thrown inside the playing field, and the Indian players were visibly left frustrated.Coming back to the game, after bundling out India for 78, openers Rory Burns and Haseeb Hameed ensured that England took the honours on the opening day of the ongoing third Test.At stumps, England\'s score reads 120/0 and the hosts have extended their lead to 42 runs. For the Three Lions, Burns (52) and Hameed (60) are currently unbeaten at the crease.Talking about the pitch on opening day, Pant said, They took the heavy roller, the wicket was much more settled down, and they batted nicely also, he said. But when we batted, the wicket was slightly soft, and they bowled in good areas, but we could have applied [ourselves] much better.Both England batsmen managed to see off the final session and the hosts concluded the opening day with all ten wickets intact, extending the lead to 42.(ANI)\\n\\nget_response(context)", \'performance\': {\'dataset\': \'cnn_dailymail\', \'accuracy\': {\'ROUGE-1\': 36.604, \'ROUGE-2\': 14.64, \'ROUGE-L\': 23.884, \'ROUGE-LSUM\': 32.902, \'loss\': 2.576, \'gen_len\': 76.398}}, \'description\': \'PEGASUS fine-tuned for summarization\'}', metadata={})]


 I have a diary entry and want to identify the names of people and locations mentioned in it.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Natural Language Processing Summarization\', \'framework\': \'Hugging Face Transformers\', \'functionality\': \'text2text-generation\', \'api_name\': \'tuner007/pegasus_summarizer\', \'api_call\': "PegasusForConditionalGeneration.from_pretrained(\'tuner007/pegasus_summarizer\')", \'api_arguments\': [\'input_text\'], \'python_environment_requirements\': [\'pip install sentencepiece\'], \'example_code\': "context = \\nIndia wicket-keeper batsman Rishabh Pant has said someone from the crowd threw a ball on pacer Mohammed Siraj while he was fielding in the ongoing third Test against England on Wednesday. Pant revealed the incident made India skipper Virat Kohli upset. I think, somebody threw a ball inside, at Siraj, so he [Kohli] was upset, said Pant in a virtual press conference after the close of the first day\'s play.You can say whatever you want to chant, but don\'t throw things at the fielders and all those things. It is not good for cricket, I guess, he added.In the third session of the opening day of the third Test, a section of spectators seemed to have asked Siraj the score of the match to tease the pacer. The India pacer however came with a brilliant reply as he gestured 1-0 (India leading the Test series) towards the crowd.Earlier this month, during the second Test match, there was some bad crowd behaviour on a show as some unruly fans threw champagne corks at India batsman KL Rahul.Kohli also intervened and he was seen gesturing towards the opening batsman to know more about the incident. An over later, the TV visuals showed that many champagne corks were thrown inside the playing field, and the Indian players were visibly left frustrated.Coming back to the game, after bundling out India for 78, openers Rory Burns and Haseeb Hameed ensured that England took the honours on the opening day of the ongoing third Test.At stumps, England\'s score reads 120/0 and the hosts have extended their lead to 42 runs. For the Three Lions, Burns (52) and Hameed (60) are currently unbeaten at the crease.Talking about the pitch on opening day, Pant said, They took the heavy roller, the wicket was much more settled down, and they batted nicely also, he said. But when we batted, the wicket was slightly soft, and they bowled in good areas, but we could have applied [ourselves] much better.Both England batsmen managed to see off the final session and the hosts concluded the opening day with all ten wickets intact, extending the lead to 42.(ANI)\\n\\nget_response(context)", \'performance\': {\'dataset\': \'cnn_dailymail\', \'accuracy\': {\'ROUGE-1\': 36.604, \'ROUGE-2\': 14.64, \'ROUGE-L\': 23.884, \'ROUGE-LSUM\': 32.902, \'loss\': 2.576, \'gen_len\': 76.398}}, \'description\': \'PEGASUS fine-tuned for summarization\'}', metadata={})]


 Our company has a deal with international clients, and it's important to detect the proper locations of meetings from multilingual texts provided to us.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Natural Language Processing Summarization\', \'framework\': \'Transformers\', \'functionality\': \'text2text-generation\', \'api_name\': \'csebuetnlp/mT5_multilingual_XLSum\', \'api_call\': "AutoModelForSeq2SeqLM.from_pretrained(\'csebuetnlp/mT5_multilingual_XLSum\')", \'api_arguments\': [\'model_name\'], \'python_environment_requirements\': [\'transformers==4.11.0.dev0\'], \'example_code\': "import re\\nfrom transformers import AutoTokenizer, AutoModelForSeq2SeqLM\\nWHITESPACE_HANDLER = lambda k: re.sub(\'\\\\s+\', \' \', re.sub(\'\\\\n+\', \' \', k.strip()))\\narticle_text = Videos that say approved vaccines are dangerous and cause autism, cancer or infertility are among those that will be taken down, the company said. The policy includes the termination of accounts of anti-vaccine influencers. Tech giants have been criticised for not doing more to counter false health information on their sites. In July, US President Joe Biden said social media platforms were largely responsible for people\'s scepticism in getting vaccinated by spreading misinformation, and appealed for them to address the issue. YouTube, which is owned by Google, said 130,000 videos were removed from its platform since last year, when it implemented a ban on content spreading misinformation about Covid vaccines. In a blog post, the company said it had seen false claims about Covid jabs spill over into misinformation about vaccines in general. The new policy covers long-approved vaccines, such as those against measles or hepatitis B. We\'re expanding our medical misinformation policies on YouTube with new guidelines on currently administered vaccines that are approved and confirmed to be safe and effective by local health authorities and the WHO, the post said, referring to the World Health Organization.\\nmodel_name = csebuetnlp/mT5_multilingual_XLSum\\ntokenizer = AutoTokenizer.from_pretrained(model_name)\\nmodel = AutoModelForSeq2SeqLM.from_pretrained(model_name)\\ninput_ids = tokenizer(\\n [WHITESPACE_HANDLER(article_text)],\\n return_tensors=pt,\\n padding=max_length,\\n truncation=True,\\n max_length=512\\n)[input_ids]\\noutput_ids = model.generate(\\n input_ids=input_ids,\\n max_length=84,\\n no_repeat_ngram_size=2,\\n num_beams=4\\n)[0]\\nsummary = tokenizer.decode(\\n output_ids,\\n skip_special_tokens=True,\\n clean_up_tokenization_spaces=False\\n)\\nprint(summary)", \'performance\': {\'dataset\': \'xsum\', \'accuracy\': {\'ROUGE-1\': 36.5, \'ROUGE-2\': 13.934, \'ROUGE-L\': 28.988, \'ROUGE-LSUM\': 28.996, \'loss\': 2.067, \'gen_len\': 26.973}}, \'description\': \'This repository contains the mT5 checkpoint finetuned on the 45 languages of XL-Sum dataset. It is a multilingual abstractive summarization model that supports text-to-text generation for 43 languages.\'}', metadata={})]


 We need to extract information from a table to answer a user's question regarding a company's revenue.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Natural Language Processing Question Answering\', \'framework\': \'Transformers\', \'functionality\': \'Question Answering\', \'api_name\': \'distilbert-base-uncased-distilled-squad\', \'api_call\': "pipeline(\'question-answering\', model=\'distilbert-base-uncased-distilled-squad\')", \'api_arguments\': [\'question\', \'context\'], \'python_environment_requirements\': [\'transformers\'], \'example_code\': "from transformers import pipeline\\nquestion_answerer = pipeline(question-answering, model=\'distilbert-base-uncased-distilled-squad\')\\ncontext = r\\n... Extractive Question Answering is the task of extracting an answer from a text given a question. An example of a\\n... question answering dataset is the SQuAD dataset, which is entirely based on that task. If you would like to fine-tune\\n... a model on a SQuAD task, you may leverage the examples/pytorch/question-answering/run_squad.py script.\\n... \\nresult = question_answerer(question=What is a good example of a question answering dataset?, context=context)\\nprint(\\n... fAnswer: \'{result[\'answer\']}\', score: {round(result[\'score\'], 4)}, start: {result[\'start\']}, end: {result[\'end\']}\\n...)", \'performance\': {\'dataset\': \'SQuAD v1.1\', \'accuracy\': \'86.9 F1 score\'}, \'description\': "DistilBERT base uncased distilled SQuAD is a fine-tuned version of DistilBERT-base-uncased for the task of question answering. It has 40% less parameters than bert-base-uncased, runs 60% faster while preserving over 95% of BERT\'s performances as measured on the GLUE language understanding benchmark."}', metadata={})]


 Develop a table-based question answering system that can answer queries based on the input data.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Multimodal Visual Question Answering\', \'framework\': \'Hugging Face Transformers\', \'functionality\': \'Transformers\', \'api_name\': \'ivelin/donut-refexp-combined-v1\', \'api_call\': "pipeline(\'visual-question-answering\', model=\'ivelin/donut-refexp-combined-v1\')", \'api_arguments\': \'image, question\', \'python_environment_requirements\': \'transformers\', \'example_code\': "vqa(image=\'path/to/image.jpg\', question=\'What is the color of the object?\')", \'performance\': {\'dataset\': \'ivelin/donut-refexp-combined-v1\', \'accuracy\': \'N/A\'}, \'description\': \'A visual question answering model that takes an image and a question as input and provides an answer based on the visual content of the image and the context of the question.\'}', metadata={})]


 Create a tool that receives a table and a question in natural language, and returns an answer to the question based on the inputted table.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Multimodal Visual Question Answering\', \'framework\': \'Hugging Face Transformers\', \'functionality\': \'Transformers\', \'api_name\': \'ivelin/donut-refexp-combined-v1\', \'api_call\': "pipeline(\'visual-question-answering\', model=\'ivelin/donut-refexp-combined-v1\')", \'api_arguments\': \'image, question\', \'python_environment_requirements\': \'transformers\', \'example_code\': "vqa(image=\'path/to/image.jpg\', question=\'What is the color of the object?\')", \'performance\': {\'dataset\': \'ivelin/donut-refexp-combined-v1\', \'accuracy\': \'N/A\'}, \'description\': \'A visual question answering model that takes an image and a question as input and provides an answer based on the visual content of the image and the context of the question.\'}', metadata={})]


 We are a medical company providing health FAQs. We need to answer customers' questions accurately.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Natural Language Processing Conversational\', \'framework\': \'Hugging Face Transformers\', \'functionality\': \'Transformers\', \'api_name\': \'hyunwoongko/blenderbot-9B\', \'api_call\': "pipeline(\'conversational\', model=\'hyunwoongko/blenderbot-9B\')", \'api_arguments\': \'text\', \'python_environment_requirements\': \'transformers\', \'example_code\': \'Input a message to start chatting with hyunwoongko/blenderbot-9B.\', \'performance\': {\'dataset\': \'blended_skill_talk\', \'accuracy\': \'Not provided\'}, \'description\': \'Building open-domain chatbots is a challenging area for machine learning research. While prior work has shown that scaling neural models in the number of parameters and the size of the data they are trained on gives improved results, we show that other ingredients are important for a high-performing chatbot. Good conversation requires a number of skills that an expert conversationalist blends in a seamless way: providing engaging talking points and listening to their partners, both asking and answering questions, and displaying knowledge, empathy and personality appropriately, depending on the situation. We show that large scale models can learn these skills when given appropriate training data and choice of generation strategy. We build variants of these recipes with 90M, 2.7B and 9.4B parameter neural models, and make our models and code publicly available. Human evaluations show our best models are superior to existing approaches in multi-turn dialogue in terms of engagingness and humanness measurements. We then discuss the limitations of this work by analyzing failure cases of our models.\'}', metadata={})]


 A group of students are doing a project on European capitals. They need to know the capital city of Germany.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Computer Vision Video Classification\', \'framework\': \'Hugging Face Transformers\', \'functionality\': \'Video Classification\', \'api_name\': \'videomae-small-finetuned-ssv2\', \'api_call\': "VideoMAEForVideoClassification.from_pretrained(\'MCG-NJU/videomae-small-finetuned-ssv2\')", \'api_arguments\': {\'model_name\': \'MCG-NJU/videomae-small-finetuned-ssv2\'}, \'python_environment_requirements\': {\'transformers\': \'from transformers import VideoMAEFeatureExtractor, VideoMAEForVideoClassification\', \'numpy\': \'import numpy as np\', \'torch\': \'import torch\'}, \'example_code\': \'video = list(np.random.randn(16, 3, 224, 224))\\nfeature_extractor = VideoMAEFeatureExtractor.from_pretrained(MCG-NJU/videomae-small-finetuned-ssv2)\\nmodel = VideoMAEForVideoClassification.from_pretrained(MCG-NJU/videomae-small-finetuned-ssv2)\\ninputs = feature_extractor(video, return_tensors=pt)\\nwith torch.no_grad():\\n  outputs = model(**inputs)\\n  logits = outputs.logits\\npredicted_class_idx = logits.argmax(-1).item()\\nprint(Predicted class:, model.config.id2label[predicted_class_idx])\', \'performance\': {\'dataset\': \'Something-Something V2\', \'accuracy\': {\'top-1\': 66.8, \'top-5\': 90.3}}, \'description\': \'VideoMAE is an extension of Masked Autoencoders (MAE) to video. The architecture of the model is very similar to that of a standard Vision Transformer (ViT), with a decoder on top for predicting pixel values for masked patches. Videos are presented to the model as a sequence of fixed-size patches (resolution 16x16), which are linearly embedded. One also adds a [CLS] token to the beginning of a sequence to use it for classification tasks. One also adds fixed sinus/cosinus position embeddings before feeding the sequence to the layers of the Transformer encoder. By pre-training the model, it learns an inner representation of videos that can then be used to extract features useful for downstream tasks: if you have a dataset of labeled videos for instance, you can train a standard classifier by placing a linear layer on top of the pre-trained encoder. One typically places a linear layer on top of the [CLS] token, as the last hidden state of this token can be seen as a representation of an entire video.\'}', metadata={})]


 Assist us in creating a question answering system to provide quick answers for customer inquiries.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Multimodal Document Question Answer\', \'framework\': \'Hugging Face Transformers\', \'functionality\': \'Transformers\', \'api_name\': \'LayoutLMX_pt_question_answer_ocrazure_correct_V15_30_03_2023\', \'api_call\': "AutoModelForDocumentQuestionAnswering.from_pretrained(\'L-oenai/LayoutLMX_pt_question_answer_ocrazure_correct_V15_30_03_2023\')", \'api_arguments\': {}, \'python_environment_requirements\': {\'transformers\': \'>=4.11.0\'}, \'example_code\': {}, \'performance\': {\'dataset\': {}, \'accuracy\': {}}, \'description\': \'A document question answering model based on LayoutLMv2, which can be used to extract answers from images with text and layout information.\'}', metadata={})]


 We are worried about price inflation in our country. Can you answer our questions on price inflation using the BERT large cased whole word masking finetuned model on SQuAD?\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Natural Language Processing Question Answering\', \'framework\': \'Transformers\', \'functionality\': \'Question Answering\', \'api_name\': \'bert-large-cased-whole-word-masking-finetuned-squad\', \'api_call\': "AutoModel.from_pretrained(\'bert-large-cased-whole-word-masking-finetuned-squad\')", \'api_arguments\': {\'model_name_or_path\': \'bert-large-cased-whole-word-masking\', \'dataset_name\': \'squad\', \'do_train\': True, \'do_eval\': True, \'learning_rate\': 3e-05, \'num_train_epochs\': 2, \'max_seq_length\': 384, \'doc_stride\': 128, \'output_dir\': \'./examples/models/wwm_cased_finetuned_squad/\', \'per_device_eval_batch_size\': 3, \'per_device_train_batch_size\': 3}, \'python_environment_requirements\': [\'torch\', \'transformers\'], \'example_code\': "from transformers import pipeline\\nqa_pipeline = pipeline(\'question-answering\', model=\'bert-large-cased-whole-word-masking-finetuned-squad\')\\nresult = qa_pipeline({\'context\': \'This is a context example.\', \'question\': \'What is this example for?\'})\\nprint(result)", \'performance\': {\'dataset\': [{\'name\': \'BookCorpus\', \'accuracy\': \'N/A\'}, {\'name\': \'English Wikipedia\', \'accuracy\': \'N/A\'}]}, \'description\': \'BERT large model (cased) whole word masking finetuned on SQuAD. This model is cased and trained with a new technique: Whole Word Masking. After pre-training, this model was fine-tuned on the SQuAD dataset.\'}', metadata={})]


 I am interested in developing a system that can categorize my text messages into different subjects like finances, health, and entertainment.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Natural Language Processing Text2Text Generation\', \'framework\': \'Transformers\', \'functionality\': \'Sentence Correction\', \'api_name\': \'flexudy/t5-base-multi-sentence-doctor\', \'api_call\': "AutoModelWithLMHead.from_pretrained(\'flexudy/t5-base-multi-sentence-doctor\')", \'api_arguments\': [\'input_text\'], \'python_environment_requirements\': [\'transformers\'], \'example_code\': \'from transformers import AutoTokenizer, AutoModelWithLMHead\\ntokenizer = AutoTokenizer.from_pretrained(flexudy/t5-base-multi-sentence-doctor)\\nmodel = AutoModelWithLMHead.from_pretrained(flexudy/t5-base-multi-sentence-doctor)\\ninput_text = repair_sentence: m a medical doct context: {That is my job I a}{or I save lives} </s>\\ninput_ids = tokenizer.encode(input_text, return_tensors=pt)\\noutputs = model.generate(input_ids, max_length=32, num_beams=1)\\nsentence = tokenizer.decode(outputs[0], skip_special_tokens=True, clean_up_tokenization_spaces=True)\\nassert sentence == I am a medical doctor.\', \'performance\': {\'dataset\': \'tatoeba\', \'accuracy\': \'Not specified\'}, \'description\': \'Sentence doctor is a T5 model that attempts to correct the errors or mistakes found in sentences. Model works on English, German and French text.\'}', metadata={})]


 An online magazine editor is trying to clujster articles into topics. We want to classify articles into categories like sport, politics, health, and technology written in French.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Computer Vision Zero-Shot Image Classification\', \'framework\': \'Hugging Face\', \'functionality\': \'Zero-Shot Image Classification\', \'api_name\': \'laion/CLIP-ViT-g-14-laion2B-s34B-b88K\', \'api_call\': "pipeline(\'zero-shot-image-classification\', model=\'laion/CLIP-ViT-g-14-laion2B-s34B-b88K\')", \'api_arguments\': {\'image\': \'path/to/image/file\', \'class_names\': \'list_of_class_names\'}, \'python_environment_requirements\': {\'huggingface_hub\': \'0.0.17\', \'transformers\': \'4.11.3\', \'torch\': \'1.9.0\', \'torchvision\': \'0.10.0\'}, \'example_code\': None, \'performance\': {\'dataset\': None, \'accuracy\': None}, \'description\': \'A zero-shot image classification model based on OpenCLIP, which can classify images into various categories without requiring any training data for those categories.\'}', metadata={})]


 We have a user manual in English that needs to be translated into Spanish to be displayed on our Spanish website.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Natural Language Processing Text2Text Generation\', \'framework\': \'Hugging Face Transformers\', \'functionality\': \'Transformers\', \'api_name\': \'Kirili4ik/mbart_ruDialogSum\', \'api_call\': "MBartForConditionalGeneration.from_pretrained(\'Kirili4ik/mbart_ruDialogSum\')", \'api_arguments\': {\'model_name\': \'Kirili4ik/mbart_ruDialogSum\'}, \'python_environment_requirements\': [\'transformers\'], \'example_code\': \'from transformers import MBartTokenizer, MBartForConditionalGeneration\\nmodel_name = Kirili4ik/mbart_ruDialogSum\\ntokenizer = AutoTokenizer.from_pretrained(model_name)\\nmodel = MBartForConditionalGeneration.from_pretrained(model_name)\\nmodel.eval()\\narticle_text = ...\\ninput_ids = tokenizer(\\n [article_text],\\n max_length=600,\\n padding=max_length,\\n truncation=True,\\n return_tensors=pt,\\n)[input_ids]\\noutput_ids = model.generate(\\n input_ids=input_ids,\\n top_k=0,\\n num_beams=3,\\n no_repeat_ngram_size=3\\n)[0]\\nsummary = tokenizer.decode(output_ids, skip_special_tokens=True)\\nprint(summary)\', \'performance\': {\'dataset\': [{\'name\': \'SAMSum Corpus (translated to Russian)\', \'accuracy\': {\'Validation ROGUE-1\': 34.5, \'Validation ROGUE-L\': 33, \'Test ROGUE-1\': 31, \'Test ROGUE-L\': 28}}]}, \'description\': \'MBart for Russian summarization fine-tuned for dialogues summarization. This model was firstly fine-tuned by Ilya Gusev on Gazeta dataset. We have fine tuned that model on SamSum dataset translated to Russian using GoogleTranslateAPI. Moreover! We have implemented a ! telegram bot @summarization_bot ! with the inference of this model. Add it to the chat and get summaries instead of dozens spam messages!\'}', metadata={})]


 We need a classifier that can sort movie synopses in German into three categories: crime, tragedy, and theft.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Audio Text-to-Speech\', \'framework\': \'speechbrain\', \'functionality\': \'Text-to-Speech\', \'api_name\': \'tts-hifigan-german\', \'api_call\': "HIFIGAN.from_hparams(source=\'padmalcom/tts-hifigan-german\', savedir=tmpdir_vocoder)", \'api_arguments\': [\'mel_output\'], \'python_environment_requirements\': [\'speechbrain\'], \'example_code\': "import torchaudio\\nfrom speechbrain.pretrained import Tacotron2\\nfrom speechbrain.pretrained import HIFIGAN\\ntacotron2 = Tacotron2.from_hparams(source=padmalcom/tts-tacotron2-german, savedir=tmpdir_tts)\\nhifi_gan = HIFIGAN.from_hparams(source=padmalcom/tts-hifigan-german, savedir=tmpdir_vocoder)\\nmel_output, mel_length, alignment = tacotron2.encode_text(Mary had a little lamb)\\nwaveforms = hifi_gan.decode_batch(mel_output)\\ntorchaudio.save(\'example_TTS.wav\',waveforms.squeeze(1), 22050)", \'performance\': {\'dataset\': \'custom German dataset\', \'accuracy\': \'Not specified\'}, \'description\': \'A HiFIGAN vocoder trained on a generated German dataset using mp3_to_training_data. The pre-trained model takes in input a spectrogram and produces a waveform in output. Typically, a vocoder is used after a TTS model that converts an input text into a spectrogram.\'}', metadata={})]


 Write an abstract about the impacts of social media on mental health, summarizing key findings from previous studies.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Natural Language Processing Summarization\', \'framework\': \'Transformers\', \'functionality\': \'text2text-generation\', \'api_name\': \'csebuetnlp/mT5_multilingual_XLSum\', \'api_call\': "AutoModelForSeq2SeqLM.from_pretrained(\'csebuetnlp/mT5_multilingual_XLSum\')", \'api_arguments\': [\'model_name\'], \'python_environment_requirements\': [\'transformers==4.11.0.dev0\'], \'example_code\': "import re\\nfrom transformers import AutoTokenizer, AutoModelForSeq2SeqLM\\nWHITESPACE_HANDLER = lambda k: re.sub(\'\\\\s+\', \' \', re.sub(\'\\\\n+\', \' \', k.strip()))\\narticle_text = Videos that say approved vaccines are dangerous and cause autism, cancer or infertility are among those that will be taken down, the company said. The policy includes the termination of accounts of anti-vaccine influencers. Tech giants have been criticised for not doing more to counter false health information on their sites. In July, US President Joe Biden said social media platforms were largely responsible for people\'s scepticism in getting vaccinated by spreading misinformation, and appealed for them to address the issue. YouTube, which is owned by Google, said 130,000 videos were removed from its platform since last year, when it implemented a ban on content spreading misinformation about Covid vaccines. In a blog post, the company said it had seen false claims about Covid jabs spill over into misinformation about vaccines in general. The new policy covers long-approved vaccines, such as those against measles or hepatitis B. We\'re expanding our medical misinformation policies on YouTube with new guidelines on currently administered vaccines that are approved and confirmed to be safe and effective by local health authorities and the WHO, the post said, referring to the World Health Organization.\\nmodel_name = csebuetnlp/mT5_multilingual_XLSum\\ntokenizer = AutoTokenizer.from_pretrained(model_name)\\nmodel = AutoModelForSeq2SeqLM.from_pretrained(model_name)\\ninput_ids = tokenizer(\\n [WHITESPACE_HANDLER(article_text)],\\n return_tensors=pt,\\n padding=max_length,\\n truncation=True,\\n max_length=512\\n)[input_ids]\\noutput_ids = model.generate(\\n input_ids=input_ids,\\n max_length=84,\\n no_repeat_ngram_size=2,\\n num_beams=4\\n)[0]\\nsummary = tokenizer.decode(\\n output_ids,\\n skip_special_tokens=True,\\n clean_up_tokenization_spaces=False\\n)\\nprint(summary)", \'performance\': {\'dataset\': \'xsum\', \'accuracy\': {\'ROUGE-1\': 36.5, \'ROUGE-2\': 13.934, \'ROUGE-L\': 28.988, \'ROUGE-LSUM\': 28.996, \'loss\': 2.067, \'gen_len\': 26.973}}, \'description\': \'This repository contains the mT5 checkpoint finetuned on the 45 languages of XL-Sum dataset. It is a multilingual abstractive summarization model that supports text-to-text generation for 43 languages.\'}', metadata={})]


 Help me to translate a Spanish text to English. The Spanish text is: \"Lo siento, pero no puedo ir a la reuni\u00f3n debido a una emergencia personal. Avisar\u00e9 al equipo y nos pondremos en contacto para reprogramar la reuni\u00f3n.\"\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Natural Language Processing Token Classification\', \'framework\': \'Hugging Face Transformers\', \'functionality\': \'Named Entity Recognition\', \'api_name\': \'Jean-Baptiste/camembert-ner\', \'api_call\': "AutoModelForTokenClassification.from_pretrained(\'Jean-Baptiste/camembert-ner\')", \'api_arguments\': {\'model\': \'model\', \'tokenizer\': \'tokenizer\', \'aggregation_strategy\': \'simple\'}, \'python_environment_requirements\': {\'transformers\': \'AutoTokenizer, AutoModelForTokenClassification, pipeline\'}, \'example_code\': "from transformers import AutoTokenizer, AutoModelForTokenClassification\\ntokenizer = AutoTokenizer.from_pretrained(Jean-Baptiste/camembert-ner)\\nmodel = AutoModelForTokenClassification.from_pretrained(Jean-Baptiste/camembert-ner)\\n\\nfrom transformers import pipeline\\nnlp = pipeline(\'ner\', model=model, tokenizer=tokenizer, aggregation_strategy=simple)\\nnlp(Apple est cre le 1er avril 1976 dans le garage de la maison d\'enfance de Steve Jobs  Los Altos en Californie par Steve Jobs, Steve Wozniak et Ronald Wayne14, puis constitue sous forme de socit le 3 janvier 1977  l\'origine sous le nom d\'Apple Computer, mais pour ses 30 ans et pour reflter la diversification de ses produits, le mot « computer  est retir le 9 janvier 2015.)", \'performance\': {\'dataset\': \'wikiner-fr\', \'accuracy\': {\'overall_f1\': 0.8914, \'PER_f1\': 0.9483, \'ORG_f1\': 0.8181, \'LOC_f1\': 0.8955, \'MISC_f1\': 0.8146}}, \'description\': \'camembert-ner is a Named Entity Recognition (NER) model fine-tuned from camemBERT on the wikiner-fr dataset. It can recognize entities such as persons, organizations, locations, and miscellaneous entities.\'}', metadata={})]


 I'm building a chatbot and I need it to respond to user questions based on the persona of an elderly person.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Natural Language Processing Text2Text Generation\', \'framework\': \'Transformers\', \'functionality\': \'Conversational\', \'api_name\': \'facebook/blenderbot-400M-distill\', \'api_call\': "BlenderbotForConditionalGeneration.from_pretrained(\'facebook/blenderbot-400M-distill\')", \'api_arguments\': "[\'message\']", \'python_environment_requirements\': [\'transformers\', \'torch\'], \'example_code\': \'Input a message to start chatting with facebook/blenderbot-400M-distill.\', \'performance\': {\'dataset\': \'blended_skill_talk\', \'accuracy\': \'Not specified\'}, \'description\': \'BlenderBot-400M-distill is a distilled version of the BlenderBot model, trained on the Blended Skill Talk dataset. It is designed for open-domain chatbot tasks and can generate text-to-text responses in a conversational manner. The model is based on the Transformers library and can be used with PyTorch, TensorFlow, and JAX.\'}', metadata={})]


 Design a chatbot that can have conversations about a variety of topics with the users.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Computer Vision Video Classification\', \'framework\': \'Hugging Face Transformers\', \'functionality\': \'Video Classification\', \'api_name\': \'videomae-small-finetuned-ssv2\', \'api_call\': "VideoMAEForVideoClassification.from_pretrained(\'MCG-NJU/videomae-small-finetuned-ssv2\')", \'api_arguments\': {\'model_name\': \'MCG-NJU/videomae-small-finetuned-ssv2\'}, \'python_environment_requirements\': {\'transformers\': \'from transformers import VideoMAEFeatureExtractor, VideoMAEForVideoClassification\', \'numpy\': \'import numpy as np\', \'torch\': \'import torch\'}, \'example_code\': \'video = list(np.random.randn(16, 3, 224, 224))\\nfeature_extractor = VideoMAEFeatureExtractor.from_pretrained(MCG-NJU/videomae-small-finetuned-ssv2)\\nmodel = VideoMAEForVideoClassification.from_pretrained(MCG-NJU/videomae-small-finetuned-ssv2)\\ninputs = feature_extractor(video, return_tensors=pt)\\nwith torch.no_grad():\\n  outputs = model(**inputs)\\n  logits = outputs.logits\\npredicted_class_idx = logits.argmax(-1).item()\\nprint(Predicted class:, model.config.id2label[predicted_class_idx])\', \'performance\': {\'dataset\': \'Something-Something V2\', \'accuracy\': {\'top-1\': 66.8, \'top-5\': 90.3}}, \'description\': \'VideoMAE is an extension of Masked Autoencoders (MAE) to video. The architecture of the model is very similar to that of a standard Vision Transformer (ViT), with a decoder on top for predicting pixel values for masked patches. Videos are presented to the model as a sequence of fixed-size patches (resolution 16x16), which are linearly embedded. One also adds a [CLS] token to the beginning of a sequence to use it for classification tasks. One also adds fixed sinus/cosinus position embeddings before feeding the sequence to the layers of the Transformer encoder. By pre-training the model, it learns an inner representation of videos that can then be used to extract features useful for downstream tasks: if you have a dataset of labeled videos for instance, you can train a standard classifier by placing a linear layer on top of the pre-trained encoder. One typically places a linear layer on top of the [CLS] token, as the last hidden state of this token can be seen as a representation of an entire video.\'}', metadata={})]


 We have a new platform that offers various services related to digital art, and we want it to be able to produce creative story ideas based on a short description. Can you help me providing suggestions?\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Natural Language Processing Conversational\', \'framework\': \'Hugging Face Transformers\', \'functionality\': \'Transformers\', \'api_name\': \'hyunwoongko/blenderbot-9B\', \'api_call\': "pipeline(\'conversational\', model=\'hyunwoongko/blenderbot-9B\')", \'api_arguments\': \'text\', \'python_environment_requirements\': \'transformers\', \'example_code\': \'Input a message to start chatting with hyunwoongko/blenderbot-9B.\', \'performance\': {\'dataset\': \'blended_skill_talk\', \'accuracy\': \'Not provided\'}, \'description\': \'Building open-domain chatbots is a challenging area for machine learning research. While prior work has shown that scaling neural models in the number of parameters and the size of the data they are trained on gives improved results, we show that other ingredients are important for a high-performing chatbot. Good conversation requires a number of skills that an expert conversationalist blends in a seamless way: providing engaging talking points and listening to their partners, both asking and answering questions, and displaying knowledge, empathy and personality appropriately, depending on the situation. We show that large scale models can learn these skills when given appropriate training data and choice of generation strategy. We build variants of these recipes with 90M, 2.7B and 9.4B parameter neural models, and make our models and code publicly available. Human evaluations show our best models are superior to existing approaches in multi-turn dialogue in terms of engagingness and humanness measurements. We then discuss the limitations of this work by analyzing failure cases of our models.\'}', metadata={})]


 We are creating a chatbot to answer customer queries on our website. Please provide a way to generate human-like text.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Natural Language Processing Conversational\', \'framework\': \'Hugging Face Transformers\', \'functionality\': \'Transformers\', \'api_name\': \'hyunwoongko/blenderbot-9B\', \'api_call\': "pipeline(\'conversational\', model=\'hyunwoongko/blenderbot-9B\')", \'api_arguments\': \'text\', \'python_environment_requirements\': \'transformers\', \'example_code\': \'Input a message to start chatting with hyunwoongko/blenderbot-9B.\', \'performance\': {\'dataset\': \'blended_skill_talk\', \'accuracy\': \'Not provided\'}, \'description\': \'Building open-domain chatbots is a challenging area for machine learning research. While prior work has shown that scaling neural models in the number of parameters and the size of the data they are trained on gives improved results, we show that other ingredients are important for a high-performing chatbot. Good conversation requires a number of skills that an expert conversationalist blends in a seamless way: providing engaging talking points and listening to their partners, both asking and answering questions, and displaying knowledge, empathy and personality appropriately, depending on the situation. We show that large scale models can learn these skills when given appropriate training data and choice of generation strategy. We build variants of these recipes with 90M, 2.7B and 9.4B parameter neural models, and make our models and code publicly available. Human evaluations show our best models are superior to existing approaches in multi-turn dialogue in terms of engagingness and humanness measurements. We then discuss the limitations of this work by analyzing failure cases of our models.\'}', metadata={})]


 To improve customer satisfaction, we want to automate the creation of written explanations that sound more natural and less robotic. Can you suggest a way to generate text that sounds conscious and alive?\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Natural Language Processing Text2Text Generation\', \'framework\': \'Hugging Face Transformers\', \'functionality\': \'Conversational\', \'api_name\': \'microsoft/GODEL-v1_1-large-seq2seq\', \'api_call\': "AutoModelForSeq2SeqLM.from_pretrained(\'microsoft/GODEL-v1_1-large-seq2seq\')", \'api_arguments\': {\'instruction\': \'Instruction: given a dialog context, you need to response empathically.\', \'knowledge\': \'\', \'dialog\': [\'Does money buy happiness?\', \'It is a question. Money buys you a lot of things, but not enough to buy happiness.\', \'What is the best way to buy happiness ?\']}, \'python_environment_requirements\': {\'transformers\': \'AutoTokenizer, AutoModelForSeq2SeqLM\'}, \'example_code\': "from transformers import AutoTokenizer, AutoModelForSeq2SeqLM\\ntokenizer = AutoTokenizer.from_pretrained(microsoft/GODEL-v1_1-large-seq2seq)\\nmodel = AutoModelForSeq2SeqLM.from_pretrained(microsoft/GODEL-v1_1-large-seq2seq)\\ndef generate(instruction, knowledge, dialog):\\n if knowledge != \'\':\\n knowledge = \'[KNOWLEDGE] \' + knowledge\\n dialog = \' EOS \'.join(dialog)\\n query = f{instruction} [CONTEXT] {dialog} {knowledge}\\n input_ids = tokenizer(f{query}, return_tensors=pt).input_ids\\n outputs = model.generate(input_ids, max_length=128, min_length=8, top_p=0.9, do_sample=True)\\n output = tokenizer.decode(outputs[0], skip_special_tokens=True)\\n return output\\n\\ninstruction = f\'Instruction: given a dialog context, you need to response empathically.\'\\nknowledge = \'\'\\ndialog = [\\n \'Does money buy happiness?\',\\n \'It is a question. Money buys you a lot of things, but not enough to buy happiness.\',\\n \'What is the best way to buy happiness ?\'\\n]\\nresponse = generate(instruction, knowledge, dialog)\\nprint(response)", \'performance\': {\'dataset\': \'Reddit discussion thread, instruction and knowledge grounded dialogs\', \'accuracy\': \'Not provided\'}, \'description\': \'GODEL is a large-scale pre-trained model for goal-directed dialogs. It is parameterized with a Transformer-based encoder-decoder model and trained for response generation grounded in external text, which allows more effective fine-tuning on dialog tasks that require conditioning the response on information that is external to the current conversation (e.g., a retrieved document). The pre-trained model can be efficiently fine-tuned and adapted to accomplish a new dialog task with a handful of task-specific dialogs. The v1.1 model is trained on 551M multi-turn dialogs from Reddit discussion thread, and 5M instruction and knowledge grounded dialogs.\'}', metadata={})]


 Our company is growing and expanding into multiple countries. We need a solution for translating English sentences to German to ensure effective communication.\n
 Use this API documentation for reference: [Document(page_content='{\'domain\': \'Natural Language Processing Summarization\', \'framework\': \'Transformers\', \'functionality\': \'text2text-generation\', \'api_name\': \'csebuetnlp/mT5_multilingual_XLSum\', \'api_call\': "AutoModelForSeq2SeqLM.from_pretrained(\'csebuetnlp/mT5_multilingual_XLSum\')", \'api_arguments\': [\'model_name\'], \'python_environment_requirements\': [\'transformers==4.11.0.dev0\'], \'example_code\': "import re\\nfrom transformers import AutoTokenizer, AutoModelForSeq2SeqLM\\nWHITESPACE_HANDLER = lambda k: re.sub(\'\\\\s+\', \' \', re.sub(\'\\\\n+\', \' \', k.strip()))\\narticle_text = Videos that say approved vaccines are dangerous and cause autism, cancer or infertility are among those that will be taken down, the company said. The policy includes the termination of accounts of anti-vaccine influencers. Tech giants have been criticised for not doing more to counter false health information on their sites. In July, US President Joe Biden said social media platforms were largely responsible for people\'s scepticism in getting vaccinated by spreading misinformation, and appealed for them to address the issue. YouTube, which is owned by Google, said 130,000 videos were removed from its platform since last year, when it implemented a ban on content spreading misinformation about Covid vaccines. In a blog post, the company said it had seen false claims about Covid jabs spill over into misinformation about vaccines in general. The new policy covers long-approved vaccines, such as those against measles or hepatitis B. We\'re expanding our medical misinformation policies on YouTube with new guidelines on currently administered vaccines that are approved and confirmed to be safe and effective by local health authorities and the WHO, the post said, referring to the World Health Organization.\\nmodel_name = csebuetnlp/mT5_multilingual_XLSum\\ntokenizer = AutoTokenizer.from_pretrained(model_name)\\nmodel = AutoModelForSeq2SeqLM.from_pretrained(model_name)\\ninput_ids = tokenizer(\\n [WHITESPACE_HANDLER(article_text)],\\n return_tensors=pt,\\n padding=max_length,\\n truncation=True,\\n max_length=512\\n)[input_ids]\\noutput_ids = model.generate(\\n input_ids=input_ids,\\n max_length=84,\\n no_repeat_ngram_size=2,\\n num_beams=4\\n)[0]\\nsummary = tokenizer.decode(\\n output_ids,\\n skip_special_tokens=True,\\n clean_up_tokenization_spaces=False\\n)\\nprint(summary)", \'performance\': {\'dataset\': \'xsum\', \'accuracy\': {\'ROUGE-1\': 36.5, \'ROUGE-2\': 13.934, \'ROUGE-L\': 28.988, \'ROUGE-LSUM\': 28.996, \'loss\': 2.067, \'gen_len\': 26.973}}, \'description\': \'This repository contains the mT5 checkpoint finetuned on the 45 languages of XL-Sum dataset. It is a multilingual abstractive summarization model that supports text-to-text generation for 43 languages.\'}', metadata={})]