@fugood/bricks-cli 2.25.0-beta.63 → 2.25.0-beta.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/lib/1010.js +1 -0
  2. package/lib/1178.js +1 -0
  3. package/lib/1215.js +1 -0
  4. package/lib/{708.js → 1708.js} +2 -2
  5. package/lib/1759.js +1 -0
  6. package/lib/1936.js +1 -0
  7. package/lib/2151.js +1 -0
  8. package/lib/{209.js → 2209.js} +3 -3
  9. package/lib/2247.js +1 -0
  10. package/lib/2486.js +1 -0
  11. package/lib/2557.js +1 -0
  12. package/lib/{223.js → 3223.js} +1 -1
  13. package/lib/3332.js +13 -0
  14. package/lib/3690.js +1 -0
  15. package/lib/3774.js +44 -0
  16. package/lib/3976.js +14 -0
  17. package/lib/4305.js +1 -0
  18. package/lib/4456.js +3 -0
  19. package/lib/{192.js → 4479.js} +4 -4
  20. package/lib/4530.js +22 -0
  21. package/lib/4642.js +9 -0
  22. package/lib/4685.js +1202 -0
  23. package/lib/5212.js +1 -0
  24. package/lib/{658.js → 5658.js} +1 -1
  25. package/lib/5785.js +1 -0
  26. package/lib/6194.js +3 -0
  27. package/lib/6370.js +1 -0
  28. package/lib/6645.js +1 -0
  29. package/lib/6818.js +1 -0
  30. package/lib/7111.js +2 -0
  31. package/lib/7456.js +1 -0
  32. package/lib/7511.js +1 -0
  33. package/lib/7574.js +1 -0
  34. package/lib/7648.js +1 -0
  35. package/lib/8026.js +1 -0
  36. package/lib/{117.js → 8117.js} +2 -2
  37. package/lib/8166.js +1 -0
  38. package/lib/853.js +1 -0
  39. package/lib/915.js +3 -3
  40. package/lib/9320.js +3 -0
  41. package/lib/{387.js → 9387.js} +1 -1
  42. package/lib/9405.js +1 -0
  43. package/lib/9430.js +1 -0
  44. package/lib/{583.js → 9583.js} +1 -1
  45. package/lib/9663.js +1 -0
  46. package/lib/{866.js → 9866.js} +1 -1
  47. package/lib/9940.js +19 -0
  48. package/lib/index.js +17 -17
  49. package/package.json +5 -5
  50. package/lib/10.js +0 -1
  51. package/lib/111.js +0 -2
  52. package/lib/166.js +0 -1
  53. package/lib/178.js +0 -1
  54. package/lib/212.js +0 -1
  55. package/lib/215.js +0 -1
  56. package/lib/247.js +0 -1
  57. package/lib/274.js +0 -55
  58. package/lib/305.js +0 -1
  59. package/lib/306.js +0 -1
  60. package/lib/320.js +0 -3
  61. package/lib/332.js +0 -13
  62. package/lib/358.js +0 -1
  63. package/lib/370.js +0 -1
  64. package/lib/405.js +0 -1
  65. package/lib/430.js +0 -1
  66. package/lib/456.js +0 -3
  67. package/lib/479.js +0 -1231
  68. package/lib/486.js +0 -1
  69. package/lib/511.js +0 -1
  70. package/lib/557.js +0 -1
  71. package/lib/574.js +0 -1
  72. package/lib/645.js +0 -1
  73. package/lib/648.js +0 -1
  74. package/lib/663.js +0 -1
  75. package/lib/690.js +0 -1
  76. package/lib/75.js +0 -1
  77. package/lib/759.js +0 -1
  78. package/lib/785.js +0 -1
  79. package/lib/818.js +0 -1
  80. package/lib/917.js +0 -1
  81. package/lib/936.js +0 -1
  82. package/lib/940.js +0 -19
package/lib/4685.js ADDED
@@ -0,0 +1,1202 @@
1
+ export const __rspack_esm_id=4685;export const __rspack_esm_ids=[4685];export const __webpack_modules__={5018(e){e.exports=function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},44668(e,t,i){var o=i(56347);function a(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,o(a.key),a)}}e.exports=function(e,t,i){return t&&a(e.prototype,t),i&&a(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},70604(e){e.exports=function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},90250(e,t,i){var o=i(3634),a=i(70604),n=i(78243),r=i(5523);e.exports=function(e){return o(e)||a(e)||n(e)||r()},e.exports.__esModule=!0,e.exports.default=e.exports},23878(e,t,i){var o=i(14319).default;e.exports=function(e,t){if("object"!=o(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var a=i.call(e,t||"default");if("object"!=o(a))return a;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},56347(e,t,i){var o=i(14319).default,a=i(23878);e.exports=function(e){var t=a(e,"string");return"symbol"==o(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},14319(e){function t(i){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(i)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},42790(e,t,i){i.d(t,{QN:()=>eo});let o={"text-classification":{name:"Text Classification",subtasks:[{type:"acceptability-classification",name:"Acceptability Classification"},{type:"entity-linking-classification",name:"Entity Linking Classification"},{type:"fact-checking",name:"Fact Checking"},{type:"intent-classification",name:"Intent Classification"},{type:"language-identification",name:"Language Identification"},{type:"multi-class-classification",name:"Multi Class Classification"},{type:"multi-label-classification",name:"Multi Label Classification"},{type:"multi-input-text-classification",name:"Multi-input Text Classification"},{type:"natural-language-inference",name:"Natural Language Inference"},{type:"semantic-similarity-classification",name:"Semantic Similarity Classification"},{type:"sentiment-classification",name:"Sentiment Classification"},{type:"topic-classification",name:"Topic Classification"},{type:"semantic-similarity-scoring",name:"Semantic Similarity Scoring"},{type:"sentiment-scoring",name:"Sentiment Scoring"},{type:"sentiment-analysis",name:"Sentiment Analysis"},{type:"hate-speech-detection",name:"Hate Speech Detection"},{type:"text-scoring",name:"Text Scoring"}],modality:"nlp"},"token-classification":{name:"Token Classification",subtasks:[{type:"named-entity-recognition",name:"Named Entity Recognition"},{type:"part-of-speech",name:"Part of Speech"},{type:"parsing",name:"Parsing"},{type:"lemmatization",name:"Lemmatization"},{type:"word-sense-disambiguation",name:"Word Sense Disambiguation"},{type:"coreference-resolution",name:"Coreference-resolution"}],modality:"nlp"},"table-question-answering":{name:"Table Question Answering",modality:"nlp"},"question-answering":{name:"Question Answering",subtasks:[{type:"extractive-qa",name:"Extractive QA"},{type:"open-domain-qa",name:"Open Domain QA"},{type:"closed-domain-qa",name:"Closed Domain QA"}],modality:"nlp"},"zero-shot-classification":{name:"Zero-Shot Classification",modality:"nlp"},translation:{name:"Translation",modality:"nlp"},summarization:{name:"Summarization",subtasks:[{type:"news-articles-summarization",name:"News Articles Summarization"},{type:"news-articles-headline-generation",name:"News Articles Headline Generation"}],modality:"nlp"},"feature-extraction":{name:"Feature Extraction",modality:"nlp"},"text-generation":{name:"Text Generation",subtasks:[{type:"dialogue-modeling",name:"Dialogue Modeling"},{type:"dialogue-generation",name:"Dialogue Generation"},{type:"conversational",name:"Conversational"},{type:"language-modeling",name:"Language Modeling"},{type:"text-simplification",name:"Text simplification"},{type:"explanation-generation",name:"Explanation Generation"},{type:"abstractive-qa",name:"Abstractive QA"},{type:"open-domain-abstractive-qa",name:"Open Domain Abstractive QA"},{type:"closed-domain-qa",name:"Closed Domain QA"},{type:"open-book-qa",name:"Open Book QA"},{type:"closed-book-qa",name:"Closed Book QA"},{type:"text2text-generation",name:"Text2Text Generation"}],modality:"nlp"},"fill-mask":{name:"Fill-Mask",subtasks:[{type:"slot-filling",name:"Slot Filling"},{type:"masked-language-modeling",name:"Masked Language Modeling"}],modality:"nlp"},"sentence-similarity":{name:"Sentence Similarity",modality:"nlp"},"text-to-speech":{name:"Text-to-Speech",modality:"audio"},"text-to-audio":{name:"Text-to-Audio",modality:"audio"},"automatic-speech-recognition":{name:"Automatic Speech Recognition",modality:"audio"},"audio-to-audio":{name:"Audio-to-Audio",modality:"audio"},"audio-classification":{name:"Audio Classification",subtasks:[{type:"keyword-spotting",name:"Keyword Spotting"},{type:"speaker-identification",name:"Speaker Identification"},{type:"audio-intent-classification",name:"Audio Intent Classification"},{type:"audio-emotion-recognition",name:"Audio Emotion Recognition"},{type:"audio-language-identification",name:"Audio Language Identification"}],modality:"audio"},"audio-text-to-text":{name:"Audio-Text-to-Text",modality:"multimodal",hideInDatasets:!0},"voice-activity-detection":{name:"Voice Activity Detection",modality:"audio"},"depth-estimation":{name:"Depth Estimation",modality:"cv"},"image-classification":{name:"Image Classification",subtasks:[{type:"multi-label-image-classification",name:"Multi Label Image Classification"},{type:"multi-class-image-classification",name:"Multi Class Image Classification"}],modality:"cv"},"object-detection":{name:"Object Detection",subtasks:[{type:"face-detection",name:"Face Detection"},{type:"vehicle-detection",name:"Vehicle Detection"}],modality:"cv"},"image-segmentation":{name:"Image Segmentation",subtasks:[{type:"instance-segmentation",name:"Instance Segmentation"},{type:"semantic-segmentation",name:"Semantic Segmentation"},{type:"panoptic-segmentation",name:"Panoptic Segmentation"}],modality:"cv"},"text-to-image":{name:"Text-to-Image",modality:"cv"},"image-to-text":{name:"Image-to-Text",subtasks:[{type:"image-captioning",name:"Image Captioning"}],modality:"cv"},"image-to-image":{name:"Image-to-Image",subtasks:[{type:"image-inpainting",name:"Image Inpainting"},{type:"image-colorization",name:"Image Colorization"},{type:"super-resolution",name:"Super Resolution"}],modality:"cv"},"image-to-video":{name:"Image-to-Video",modality:"cv"},"unconditional-image-generation":{name:"Unconditional Image Generation",modality:"cv"},"video-classification":{name:"Video Classification",modality:"cv"},"reinforcement-learning":{name:"Reinforcement Learning",modality:"rl"},robotics:{name:"Robotics",modality:"rl",subtasks:[{type:"grasping",name:"Grasping"},{type:"task-planning",name:"Task Planning"}]},"tabular-classification":{name:"Tabular Classification",modality:"tabular",subtasks:[{type:"tabular-multi-class-classification",name:"Tabular Multi Class Classification"},{type:"tabular-multi-label-classification",name:"Tabular Multi Label Classification"}]},"tabular-regression":{name:"Tabular Regression",modality:"tabular",subtasks:[{type:"tabular-single-column-regression",name:"Tabular Single Column Regression"}]},"tabular-to-text":{name:"Tabular to Text",modality:"tabular",subtasks:[{type:"rdf-to-text",name:"RDF to text"}],hideInModels:!0},"table-to-text":{name:"Table to Text",modality:"nlp",hideInModels:!0},"multiple-choice":{name:"Multiple Choice",subtasks:[{type:"multiple-choice-qa",name:"Multiple Choice QA"},{type:"multiple-choice-coreference-resolution",name:"Multiple Choice Coreference Resolution"}],modality:"nlp",hideInModels:!0},"text-ranking":{name:"Text Ranking",modality:"nlp"},"text-retrieval":{name:"Text Retrieval",subtasks:[{type:"document-retrieval",name:"Document Retrieval"},{type:"utterance-retrieval",name:"Utterance Retrieval"},{type:"entity-linking-retrieval",name:"Entity Linking Retrieval"},{type:"fact-checking-retrieval",name:"Fact Checking Retrieval"}],modality:"nlp",hideInModels:!0},"time-series-forecasting":{name:"Time Series Forecasting",modality:"tabular",subtasks:[{type:"univariate-time-series-forecasting",name:"Univariate Time Series Forecasting"},{type:"multivariate-time-series-forecasting",name:"Multivariate Time Series Forecasting"}]},"text-to-video":{name:"Text-to-Video",modality:"cv"},"image-text-to-text":{name:"Image-Text-to-Text",modality:"multimodal"},"image-text-to-image":{name:"Image-Text-to-Image",modality:"multimodal"},"image-text-to-video":{name:"Image-Text-to-Video",modality:"multimodal"},"visual-question-answering":{name:"Visual Question Answering",subtasks:[{type:"visual-question-answering",name:"Visual Question Answering"}],modality:"multimodal"},"document-question-answering":{name:"Document Question Answering",subtasks:[{type:"document-question-answering",name:"Document Question Answering"}],modality:"multimodal",hideInDatasets:!0},"zero-shot-image-classification":{name:"Zero-Shot Image Classification",modality:"cv"},"graph-ml":{name:"Graph Machine Learning",modality:"other"},"mask-generation":{name:"Mask Generation",modality:"cv"},"zero-shot-object-detection":{name:"Zero-Shot Object Detection",modality:"cv"},"text-to-3d":{name:"Text-to-3D",modality:"cv"},"image-to-3d":{name:"Image-to-3D",modality:"cv"},"image-feature-extraction":{name:"Image Feature Extraction",modality:"cv"},"video-text-to-text":{name:"Video-Text-to-Text",modality:"multimodal",hideInDatasets:!1},"keypoint-detection":{name:"Keypoint Detection",subtasks:[{type:"pose-estimation",name:"Pose Estimation"}],modality:"cv",hideInDatasets:!0},"visual-document-retrieval":{name:"Visual Document Retrieval",modality:"multimodal"},"any-to-any":{name:"Any-to-Any",modality:"multimodal"},"video-to-video":{name:"Video-to-Video",modality:"cv",hideInDatasets:!0},other:{name:"Other",modality:"other",hideInModels:!0,hideInDatasets:!0}};Object.keys(o),Object.values(o).flatMap(e=>"subtasks"in e?e.subtasks:[]).map(e=>e.type);let a={datasets:[{description:"A benchmark of 10 different audio tasks.",id:"s3prl/superb"},{description:"A dataset of YouTube clips and their sound categories.",id:"agkphysics/AudioSet"}],demo:{inputs:[{filename:"audio.wav",type:"audio"}],outputs:[{data:[{label:"Up",score:.2},{label:"Down",score:.8}],type:"chart"}]},metrics:[{description:"",id:"accuracy"},{description:"",id:"recall"},{description:"",id:"precision"},{description:"",id:"f1"}],models:[{description:"An easy-to-use model for command recognition.",id:"speechbrain/google_speech_command_xvector"},{description:"An emotion recognition model.",id:"ehcalabres/wav2vec2-lg-xlsr-en-speech-emotion-recognition"},{description:"A language identification model.",id:"facebook/mms-lid-126"}],spaces:[{description:"An application that can classify music into different genre.",id:"kurianbenoy/audioclassification"}],summary:"Audio classification is the task of assigning a label or class to a given audio. It can be used for recognizing which command a user is giving or the emotion of a statement, as well as identifying a speaker.",widgetModels:["MIT/ast-finetuned-audioset-10-10-0.4593"],youtubeId:"KWwzcmG98Ds"},n={datasets:[{description:"Wikipedia dataset containing cleaned articles of all languages. Can be used to train `feature-extraction` models.",id:"wikipedia"}],demo:{inputs:[{label:"Input",content:"India, officially the Republic of India, is a country in South Asia.",type:"text"}],outputs:[{table:[["Dimension 1","Dimension 2","Dimension 3"],["2.583383083343506","2.757075071334839","0.9023529887199402"],["8.29393482208252","1.1071064472198486","2.03399395942688"],["-0.7754912972450256","-1.647324562072754","-0.6113331913948059"],["0.07087723910808563","1.5942802429199219","1.4610432386398315"]],type:"tabular"}]},metrics:[],models:[{description:"A powerful feature extraction model for natural language processing tasks.",id:"thenlper/gte-large"},{description:"A strong feature extraction model for retrieval.",id:"Alibaba-NLP/gte-Qwen1.5-7B-instruct"}],spaces:[{description:"A leaderboard to rank text feature extraction models based on a benchmark.",id:"mteb/leaderboard"},{description:"A leaderboard to rank best feature extraction models based on human feedback.",id:"mteb/arena"}],summary:"Feature extraction is the task of extracting features learnt in a model.",widgetModels:["facebook/bart-base"]},r={datasets:[{description:"A common dataset that is used to train models for many languages.",id:"wikipedia"},{description:"A large English dataset with text crawled from the web.",id:"c4"}],demo:{inputs:[{label:"Input",content:"The <mask> barked at me",type:"text"}],outputs:[{type:"chart",data:[{label:"wolf",score:.487},{label:"dog",score:.061},{label:"cat",score:.058},{label:"fox",score:.047},{label:"squirrel",score:.025}]}]},metrics:[{description:"Cross Entropy is a metric that calculates the difference between two probability distributions. Each probability distribution is the distribution of predicted words",id:"cross_entropy"},{description:"Perplexity is the exponential of the cross-entropy loss. It evaluates the probabilities assigned to the next word by the model. Lower perplexity indicates better performance",id:"perplexity"}],models:[{description:"State-of-the-art masked language model.",id:"answerdotai/ModernBERT-large"},{description:"A multilingual model trained on 100 languages.",id:"FacebookAI/xlm-roberta-base"}],spaces:[],summary:"Masked language modeling is the task of masking some of the words in a sentence and predicting which words should replace those masks. These models are useful when we want to get a statistical understanding of the language in which the model is trained in.",widgetModels:["distilroberta-base"],youtubeId:"mqElG5QJWUg"},s={datasets:[{description:"Benchmark dataset used for image classification with images that belong to 100 classes.",id:"cifar100"},{description:"Dataset consisting of images of garments.",id:"fashion_mnist"}],demo:{inputs:[{filename:"image-classification-input.jpeg",type:"img"}],outputs:[{type:"chart",data:[{label:"Egyptian cat",score:.514},{label:"Tabby cat",score:.193},{label:"Tiger cat",score:.068}]}]},metrics:[{description:"",id:"accuracy"},{description:"",id:"recall"},{description:"",id:"precision"},{description:"",id:"f1"}],models:[{description:"A strong image classification model.",id:"google/vit-base-patch16-224"},{description:"A robust image classification model.",id:"facebook/deit-base-distilled-patch16-224"},{description:"A strong image classification model.",id:"facebook/convnext-large-224"}],spaces:[{description:"A leaderboard to evaluate different image classification models.",id:"timm/leaderboard"}],summary:"Image classification is the task of assigning a label or class to an entire image. Images are expected to have only one class for each image. Image classification models take an image as input and return a prediction about which class the image belongs to.",widgetModels:["google/vit-base-patch16-224"],youtubeId:"tjAIM7BOYhw"},u={datasets:[{description:"ImageNet-1K is a image classification dataset in which images are used to train image-feature-extraction models.",id:"imagenet-1k"}],demo:{inputs:[{filename:"mask-generation-input.png",type:"img"}],outputs:[{table:[["Dimension 1","Dimension 2","Dimension 3"],["0.21236686408519745","1.0919708013534546","0.8512550592422485"],["0.809657871723175","-0.18544459342956543","-0.7851548194885254"],["1.3103108406066895","-0.2479034662246704","-0.9107287526130676"],["1.8536205291748047","-0.36419737339019775","0.09717650711536407"]],type:"tabular"}]},metrics:[],models:[{description:"A powerful image feature extraction model.",id:"timm/vit_large_patch14_dinov2.lvd142m"},{description:"A strong image feature extraction model.",id:"nvidia/MambaVision-T-1K"},{description:"A robust image feature extraction model.",id:"facebook/dino-vitb16"},{description:"Cutting-edge image feature extraction model.",id:"apple/aimv2-large-patch14-336-distilled"},{description:"Strong image feature extraction model that can be used on images and documents.",id:"OpenGVLab/InternViT-6B-448px-V1-2"}],spaces:[{description:"A leaderboard to evaluate different image-feature-extraction models on classification performances",id:"timm/leaderboard"}],summary:"Image feature extraction is the task of extracting features learnt in a computer vision model.",widgetModels:[]},l={datasets:[],demo:{inputs:[],outputs:[]},isPlaceholder:!0,metrics:[],models:[],spaces:[],summary:"",widgetModels:[],youtubeId:void 0,canonicalId:void 0},d={datasets:[{description:"Bing queries with relevant passages from various web sources.",id:"microsoft/ms_marco"}],demo:{inputs:[{label:"Source sentence",content:"Machine learning is so easy.",type:"text"},{label:"Sentences to compare to",content:"Deep learning is so straightforward.",type:"text"},{label:"",content:"This is so difficult, like rocket science.",type:"text"},{label:"",content:"I can't believe how much I struggled with this.",type:"text"}],outputs:[{type:"chart",data:[{label:"Deep learning is so straightforward.",score:.623},{label:"This is so difficult, like rocket science.",score:.413},{label:"I can't believe how much I struggled with this.",score:.256}]}]},metrics:[{description:"Reciprocal Rank is a measure used to rank the relevancy of documents given a set of documents. Reciprocal Rank is the reciprocal of the rank of the document retrieved, meaning, if the rank is 3, the Reciprocal Rank is 0.33. If the rank is 1, the Reciprocal Rank is 1",id:"Mean Reciprocal Rank"},{description:"The similarity of the embeddings is evaluated mainly on cosine similarity. It is calculated as the cosine of the angle between two vectors. It is particularly useful when your texts are not the same length",id:"Cosine Similarity"}],models:[{description:"This model works well for sentences and paragraphs and can be used for clustering/grouping and semantic searches.",id:"sentence-transformers/all-mpnet-base-v2"},{description:"A multilingual robust sentence similarity model.",id:"BAAI/bge-m3"},{description:"A robust sentence similarity model.",id:"HIT-TMG/KaLM-embedding-multilingual-mini-instruct-v1.5"}],spaces:[{description:"An application that leverages sentence similarity to answer questions from YouTube videos.",id:"Gradio-Blocks/Ask_Questions_To_YouTube_Videos"},{description:"An application that retrieves relevant PubMed abstracts for a given online article which can be used as further references.",id:"Gradio-Blocks/pubmed-abstract-retriever"},{description:"An application that leverages sentence similarity to summarize text.",id:"nickmuchi/article-text-summarizer"},{description:"A guide that explains how Sentence Transformers can be used for semantic search.",id:"sentence-transformers/Sentence_Transformers_for_semantic_search"}],summary:"Sentence Similarity is the task of determining how similar two texts are. Sentence similarity models convert input texts into vectors (embeddings) that capture semantic information and calculate how close (similar) they are between them. This task is particularly useful for information retrieval and clustering/grouping.",widgetModels:["sentence-transformers/all-MiniLM-L6-v2"],youtubeId:"VCZq5AkbNEU"},c={datasets:[{description:"The WikiTableQuestions dataset is a large-scale dataset for the task of question answering on semi-structured tables.",id:"wikitablequestions"},{description:"WikiSQL is a dataset of 80654 hand-annotated examples of questions and SQL queries distributed across 24241 tables from Wikipedia.",id:"wikisql"}],demo:{inputs:[{table:[["Rank","Name","No.of reigns","Combined days"],["1","lou Thesz","3","3749"],["2","Ric Flair","8","3103"],["3","Harley Race","7","1799"]],type:"tabular"},{label:"Question",content:"What is the number of reigns for Harley Race?",type:"text"}],outputs:[{label:"Result",content:"7",type:"text"}]},metrics:[{description:"Checks whether the predicted answer(s) is the same as the ground-truth answer(s).",id:"Denotation Accuracy"}],models:[{description:"A table question answering model that is capable of neural SQL execution, i.e., employ TAPEX to execute a SQL query on a given table.",id:"microsoft/tapex-base"},{description:"A robust table question answering model.",id:"google/tapas-base-finetuned-wtq"}],spaces:[{description:"An application that answers questions based on table CSV files.",id:"katanaml/table-query"}],summary:"Table Question Answering (Table QA) is the answering a question about an information on a given table.",widgetModels:["google/tapas-base-finetuned-wtq"]},p={datasets:[{description:"A comprehensive curation of datasets covering all benchmarks.",id:"inria-soda/tabular-benchmark"}],demo:{inputs:[{table:[["Glucose","Blood Pressure ","Skin Thickness","Insulin","BMI"],["148","72","35","0","33.6"],["150","50","30","0","35.1"],["141","60","29","1","39.2"]],type:"tabular"}],outputs:[{table:[["Diabetes"],["1"],["1"],["0"]],type:"tabular"}]},metrics:[{description:"",id:"accuracy"},{description:"",id:"recall"},{description:"",id:"precision"},{description:"",id:"f1"}],models:[{description:"Breast cancer prediction model based on decision trees.",id:"scikit-learn/cancer-prediction-trees"}],spaces:[{description:"An application that can predict defective products on a production line.",id:"scikit-learn/tabular-playground"},{description:"An application that compares various tabular classification techniques on different datasets.",id:"scikit-learn/classification"}],summary:"Tabular classification is the task of classifying a target category (a group) based on set of attributes.",widgetModels:["scikit-learn/tabular-playground"],youtubeId:""},m={datasets:[{description:"A comprehensive curation of datasets covering all benchmarks.",id:"inria-soda/tabular-benchmark"}],demo:{inputs:[{table:[["Car Name","Horsepower","Weight"],["ford torino","140","3,449"],["amc hornet","97","2,774"],["toyota corolla","65","1,773"]],type:"tabular"}],outputs:[{table:[["MPG (miles per gallon)"],["17"],["18"],["31"]],type:"tabular"}]},metrics:[{description:"",id:"mse"},{description:"Coefficient of determination (or R-squared) is a measure of how well the model fits the data. Higher R-squared is considered a better fit.",id:"r-squared"}],models:[{description:"Fish weight prediction based on length measurements and species.",id:"scikit-learn/Fish-Weight"}],spaces:[{description:"An application that can predict weight of a fish based on set of attributes.",id:"scikit-learn/fish-weight-prediction"}],summary:"Tabular regression is the task of predicting a numerical value given a set of attributes.",widgetModels:["scikit-learn/Fish-Weight"],youtubeId:""},h={datasets:[{description:"A widely used dataset useful to benchmark named entity recognition models.",id:"eriktks/conll2003"},{description:"A multilingual dataset of Wikipedia articles annotated for named entity recognition in over 150 different languages.",id:"unimelb-nlp/wikiann"}],demo:{inputs:[{label:"Input",content:"My name is Omar and I live in Z\xfcrich.",type:"text"}],outputs:[{text:"My name is Omar and I live in Z\xfcrich.",tokens:[{type:"PERSON",start:11,end:15},{type:"GPE",start:30,end:36}],type:"text-with-tokens"}]},metrics:[{description:"",id:"accuracy"},{description:"",id:"recall"},{description:"",id:"precision"},{description:"",id:"f1"}],models:[{description:"A robust performance model to identify people, locations, organizations and names of miscellaneous entities.",id:"dslim/bert-base-NER"},{description:"A strong model to identify people, locations, organizations and names in multiple languages.",id:"FacebookAI/xlm-roberta-large-finetuned-conll03-english"},{description:"A token classification model specialized on medical entity recognition.",id:"blaze999/Medical-NER"},{description:"Flair models are typically the state of the art in named entity recognition tasks.",id:"flair/ner-english"}],spaces:[{description:"An application that can recognizes entities, extracts noun chunks and recognizes various linguistic features of each token.",id:"spacy/gradio_pipeline_visualizer"}],summary:"Token classification is a natural language understanding task in which a label is assigned to some tokens in a text. Some popular token classification subtasks are Named Entity Recognition (NER) and Part-of-Speech (PoS) tagging. NER models could be trained to identify specific entities in a text, such as dates, individuals and places; and PoS tagging would identify, for example, which words in a text are verbs, nouns, and punctuation marks.",widgetModels:["FacebookAI/xlm-roberta-large-finetuned-conll03-english"],youtubeId:"wVHdVlPScxA"},g={datasets:[{description:"A widely used dataset used to benchmark multiple variants of text classification.",id:"nyu-mll/glue"},{description:"A text classification dataset used to benchmark natural language inference models",id:"stanfordnlp/snli"}],demo:{inputs:[{label:"Input",content:"I love Hugging Face!",type:"text"}],outputs:[{type:"chart",data:[{label:"POSITIVE",score:.9},{label:"NEUTRAL",score:.1},{label:"NEGATIVE",score:0}]}]},metrics:[{description:"",id:"accuracy"},{description:"",id:"recall"},{description:"",id:"precision"},{description:"The F1 metric is the harmonic mean of the precision and recall. It can be calculated as: F1 = 2 * (precision * recall) / (precision + recall)",id:"f1"}],models:[{description:"A robust model trained for sentiment analysis.",id:"distilbert/distilbert-base-uncased-finetuned-sst-2-english"},{description:"A sentiment analysis model specialized in financial sentiment.",id:"ProsusAI/finbert"},{description:"A sentiment analysis model specialized in analyzing tweets.",id:"cardiffnlp/twitter-roberta-base-sentiment-latest"},{description:"A model that can classify languages.",id:"papluca/xlm-roberta-base-language-detection"},{description:"A model that can classify text generation attacks.",id:"meta-llama/Prompt-Guard-86M"}],spaces:[{description:"An application that can classify financial sentiment.",id:"IoannisTr/Tech_Stocks_Trading_Assistant"},{description:"A dashboard that contains various text classification tasks.",id:"miesnerjacob/Multi-task-NLP"},{description:"An application that analyzes user reviews in healthcare.",id:"spacy/healthsea-demo"}],summary:"Text Classification is the task of assigning a label or class to a given text. Some use cases are sentiment analysis, natural language inference, and assessing grammatical correctness.",widgetModels:["distilbert/distilbert-base-uncased-finetuned-sst-2-english"],youtubeId:"leNG9fN9FQU"},f={datasets:[{description:"Bing queries with relevant passages from various web sources.",id:"microsoft/ms_marco"}],demo:{inputs:[{label:"Source sentence",content:"Machine learning is so easy.",type:"text"},{label:"Sentences to compare to",content:"Deep learning is so straightforward.",type:"text"},{label:"",content:"This is so difficult, like rocket science.",type:"text"},{label:"",content:"I can't believe how much I struggled with this.",type:"text"}],outputs:[{type:"chart",data:[{label:"Deep learning is so straightforward.",score:2.2006407},{label:"This is so difficult, like rocket science.",score:-6.2634873},{label:"I can't believe how much I struggled with this.",score:-10.251488}]}]},metrics:[{description:"Discounted Cumulative Gain (DCG) measures the gain, or usefulness, of search results discounted by their position. The normalization is done by dividing the DCG by the ideal DCG, which is the DCG of the perfect ranking.",id:"Normalized Discounted Cumulative Gain"},{description:"Reciprocal Rank is a measure used to rank the relevancy of documents given a set of documents. Reciprocal Rank is the reciprocal of the rank of the document retrieved, meaning, if the rank is 3, the Reciprocal Rank is 0.33. If the rank is 1, the Reciprocal Rank is 1",id:"Mean Reciprocal Rank"},{description:"Mean Average Precision (mAP) is the overall average of the Average Precision (AP) values, where AP is the Area Under the PR Curve (AUC-PR)",id:"Mean Average Precision"}],models:[{description:"An extremely efficient text ranking model trained on a web search dataset.",id:"cross-encoder/ms-marco-MiniLM-L6-v2"},{description:"A strong multilingual text reranker model.",id:"Alibaba-NLP/gte-multilingual-reranker-base"},{description:"An efficient text ranking model that punches above its weight.",id:"Alibaba-NLP/gte-reranker-modernbert-base"}],spaces:[],summary:"Text Ranking is the task of ranking a set of texts based on their relevance to a query. Text ranking models are trained on large datasets of queries and relevant documents to learn how to rank documents based on their relevance to the query. This task is particularly useful for search engines and information retrieval systems.",widgetModels:["cross-encoder/ms-marco-MiniLM-L6-v2"],youtubeId:""},D={datasets:[{description:"Benchmark dataset used for video classification with videos that belong to 400 classes.",id:"kinetics400"}],demo:{inputs:[{filename:"video-classification-input.gif",type:"img"}],outputs:[{type:"chart",data:[{label:"Playing Guitar",score:.514},{label:"Playing Tennis",score:.193},{label:"Cooking",score:.068}]}]},metrics:[{description:"",id:"accuracy"},{description:"",id:"recall"},{description:"",id:"precision"},{description:"",id:"f1"}],models:[{description:"Strong Video Classification model trained on the Kinetics 400 dataset.",id:"google/vivit-b-16x2-kinetics400"},{description:"Strong Video Classification model trained on the Kinetics 400 dataset.",id:"microsoft/xclip-base-patch32"}],spaces:[{description:"An application that classifies video at different timestamps.",id:"nateraw/lavila"},{description:"An application that classifies video.",id:"fcakyon/video-classification"}],summary:"Video classification is the task of assigning a label or class to an entire video. Videos are expected to have only one class for each video. Video classification models take a video as input and return a prediction about which class the video belongs to.",widgetModels:[],youtubeId:""},b={datasets:[{description:"A large dataset used to train visual document retrieval models.",id:"vidore/colpali_train_set"}],demo:{inputs:[{filename:"input.png",type:"img"},{label:"Question",content:"Is the model in this paper the fastest for inference?",type:"text"}],outputs:[{type:"chart",data:[{label:"Page 10",score:.7},{label:"Page 11",score:.06},{label:"Page 9",score:.003}]}]},isPlaceholder:!1,metrics:[{description:"NDCG@k scores ranked recommendation lists for top-k results. 0 is the worst, 1 is the best.",id:"Normalized Discounted Cumulative Gain at K"}],models:[{description:"Very accurate visual document retrieval model for multilingual queries and documents.",id:"vidore/colqwen2-v1.0"},{description:"Very fast and efficient visual document retrieval model that can also take in other modalities like audio.",id:"Tevatron/OmniEmbed-v0.1"}],spaces:[{description:"A leaderboard of visual document retrieval models.",id:"vidore/vidore-leaderboard"},{description:"Visual retrieval augmented generation demo based on ColQwen2 model.",id:"vidore/visual-rag-tool"}],summary:"Visual document retrieval is the task of searching for relevant image-based documents, such as PDFs. These models take a text query and multiple documents as input and return the top-most relevant documents and relevancy scores as output.",widgetModels:[""],youtubeId:""},y={datasets:[{description:"A widely used dataset containing questions (with answers) about images.",id:"Graphcore/vqa"},{description:"A dataset to benchmark visual reasoning based on text in images.",id:"facebook/textvqa"}],demo:{inputs:[{filename:"elephant.jpeg",type:"img"},{label:"Question",content:"What is in this image?",type:"text"}],outputs:[{type:"chart",data:[{label:"elephant",score:.97},{label:"elephants",score:.06},{label:"animal",score:.003}]}]},isPlaceholder:!1,metrics:[{description:"",id:"accuracy"},{description:"Measures how much a predicted answer differs from the ground truth based on the difference in their semantic meaning.",id:"wu-palmer similarity"}],models:[{description:"A visual question answering model trained to convert charts and plots to text.",id:"google/deplot"},{description:"A visual question answering model trained for mathematical reasoning and chart derendering from images.",id:"google/matcha-base"},{description:"A strong visual question answering that answers questions from book covers.",id:"google/pix2struct-ocrvqa-large"}],spaces:[{description:"An application that compares visual question answering models across different tasks.",id:"merve/pix2struct"},{description:"An application that can answer questions based on images.",id:"nielsr/vilt-vqa"},{description:"An application that can caption images and answer questions about a given image. ",id:"Salesforce/BLIP"},{description:"An application that can caption images and answer questions about a given image. ",id:"vumichien/Img2Prompt"}],summary:"Visual Question Answering is the task of answering open-ended questions based on an image. They output natural language responses to natural language questions.",widgetModels:["dandelin/vilt-b32-finetuned-vqa"],youtubeId:""},_={datasets:[{description:"A widely used dataset used to benchmark multiple variants of text classification.",id:"nyu-mll/glue"},{description:"The Multi-Genre Natural Language Inference (MultiNLI) corpus is a crowd-sourced collection of 433k sentence pairs annotated with textual entailment information.",id:"nyu-mll/multi_nli"},{description:"FEVER is a publicly available dataset for fact extraction and verification against textual sources.",id:"fever/fever"}],demo:{inputs:[{label:"Text Input",content:"Dune is the best movie ever.",type:"text"},{label:"Candidate Labels",content:"CINEMA, ART, MUSIC",type:"text"}],outputs:[{type:"chart",data:[{label:"CINEMA",score:.9},{label:"ART",score:.1},{label:"MUSIC",score:0}]}]},metrics:[],models:[{description:"Powerful zero-shot text classification model.",id:"facebook/bart-large-mnli"},{description:"Cutting-edge zero-shot multilingual text classification model.",id:"MoritzLaurer/ModernBERT-large-zeroshot-v2.0"},{description:"Zero-shot text classification model that can be used for topic and sentiment classification.",id:"knowledgator/gliclass-modern-base-v2.0-init"}],spaces:[],summary:"Zero-shot text classification is a task in natural language processing where a model is trained on a set of labeled examples but is then able to classify new examples from previously unseen classes.",widgetModels:["facebook/bart-large-mnli"]},A={datasets:[{description:"",id:""}],demo:{inputs:[{filename:"image-classification-input.jpeg",type:"img"},{label:"Classes",content:"cat, dog, bird",type:"text"}],outputs:[{type:"chart",data:[{label:"Cat",score:.664},{label:"Dog",score:.329},{label:"Bird",score:.008}]}]},metrics:[{description:"Computes the number of times the correct label appears in top K labels predicted",id:"top-K accuracy"}],models:[{description:"Multilingual image classification model for 80 languages.",id:"visheratin/mexma-siglip"},{description:"Strong zero-shot image classification model.",id:"google/siglip2-base-patch16-224"},{description:"Robust zero-shot image classification model.",id:"intfloat/mmE5-mllama-11b-instruct"},{description:"Powerful zero-shot image classification model supporting 94 languages.",id:"jinaai/jina-clip-v2"},{description:"Strong image classification model for biomedical domain.",id:"microsoft/BiomedCLIP-PubMedBERT_256-vit_base_patch16_224"}],spaces:[{description:"An application that leverages zero-shot image classification to find best captions to generate an image. ",id:"pharma/CLIP-Interrogator"},{description:"An application to compare different zero-shot image classification models. ",id:"merve/compare_clip_siglip"}],summary:"Zero-shot image classification is the task of classifying previously unseen classes during training of a model.",widgetModels:["google/siglip-so400m-patch14-224"],youtubeId:""},v={"audio-classification":["speechbrain","transformers","transformers.js"],"audio-to-audio":["asteroid","fairseq","speechbrain"],"automatic-speech-recognition":["espnet","nemo","speechbrain","transformers","transformers.js"],"audio-text-to-text":["transformers"],"depth-estimation":["transformers","transformers.js"],"document-question-answering":["transformers","transformers.js"],"feature-extraction":["sentence-transformers","transformers","transformers.js"],"fill-mask":["transformers","transformers.js"],"graph-ml":["transformers"],"image-classification":["keras","timm","transformers","transformers.js"],"image-feature-extraction":["timm","transformers"],"image-segmentation":["transformers","transformers.js"],"image-text-to-text":["transformers"],"image-text-to-image":["diffusers"],"image-text-to-video":["diffusers"],"image-to-image":["diffusers","transformers","transformers.js"],"image-to-text":["transformers","transformers.js"],"image-to-video":["diffusers"],"keypoint-detection":["transformers"],"video-classification":["transformers"],"mask-generation":["transformers"],"multiple-choice":["transformers"],"object-detection":["transformers","transformers.js","ultralytics"],other:[],"question-answering":["adapter-transformers","allennlp","transformers","transformers.js"],robotics:[],"reinforcement-learning":["transformers","stable-baselines3","ml-agents","sample-factory"],"sentence-similarity":["sentence-transformers","spacy","transformers.js"],summarization:["transformers","transformers.js"],"table-question-answering":["transformers"],"table-to-text":["transformers"],"tabular-classification":["sklearn"],"tabular-regression":["sklearn"],"tabular-to-text":["transformers"],"text-classification":["adapter-transformers","setfit","spacy","transformers","transformers.js"],"text-generation":["transformers","transformers.js"],"text-ranking":["sentence-transformers","transformers"],"text-retrieval":[],"text-to-image":["diffusers"],"text-to-speech":["espnet","tensorflowtts","transformers","transformers.js"],"text-to-audio":["transformers","transformers.js"],"text-to-video":["diffusers"],"time-series-forecasting":[],"token-classification":["adapter-transformers","flair","spacy","span-marker","stanza","transformers","transformers.js"],translation:["transformers","transformers.js"],"unconditional-image-generation":["diffusers"],"video-text-to-text":["transformers"],"visual-question-answering":["transformers","transformers.js"],"voice-activity-detection":[],"zero-shot-classification":["transformers","transformers.js"],"zero-shot-image-classification":["transformers","transformers.js"],"zero-shot-object-detection":["transformers","transformers.js"],"text-to-3d":["diffusers"],"image-to-3d":["diffusers"],"any-to-any":["transformers"],"visual-document-retrieval":["transformers"],"video-to-video":["diffusers"]};function C(e,t=l){return{...t,id:e,label:o[e].name,libraries:v[e]}}C("any-to-any",{datasets:[{description:"A dataset with multiple modality input and output pairs.",id:"PKU-Alignment/align-anything"}],demo:{inputs:[{filename:"any-to-any-input.jpg",type:"img"},{label:"Text Prompt",content:"What is the significance of this place?",type:"text"}],outputs:[{label:"Generated Text",content:"The place in the picture is Osaka Castle, located in Osaka, Japan. Osaka Castle is a historic castle that was originally built in the 16th century by Toyotomi Hideyoshi, a powerful warlord of the time. It is one of the most famous landmarks in Osaka and is known for its distinctive white walls and black roof tiles. The castle has been rebuilt several times over the centuries and is now a popular tourist attraction, offering visitors a glimpse into Japan's rich history and culture.",type:"text"},{filename:"any-to-any-output.wav",type:"audio"}]},metrics:[],models:[{description:"Strong model that can take in video, audio, image, text and output text and natural speech.",id:"Qwen/Qwen2.5-Omni-7B"},{description:"Robust model that can take in image and text and generate image and text.",id:"OmniGen2/OmniGen2"},{description:"Any-to-any model with speech, video, audio, image and text understanding capabilities.",id:"openbmb/MiniCPM-o-2_6"},{description:"A model that can understand image and text and generate image and text.",id:"ByteDance-Seed/BAGEL-7B-MoT"}],spaces:[{description:"An application to chat with an any-to-any (image & text) model.",id:"OmniGen2/OmniGen2"}],summary:"Any-to-any models can understand two or more modalities and output two or more modalities.",widgetModels:[],youtubeId:""}),C("audio-classification",a),C("audio-to-audio",{datasets:[{description:"512-element X-vector embeddings of speakers from CMU ARCTIC dataset.",id:"Matthijs/cmu-arctic-xvectors"}],demo:{inputs:[{filename:"input.wav",type:"audio"}],outputs:[{filename:"label-0.wav",type:"audio"},{filename:"label-1.wav",type:"audio"}]},metrics:[{description:"The Signal-to-Noise ratio is the relationship between the target signal level and the background noise level. It is calculated as the logarithm of the target signal divided by the background noise, in decibels.",id:"snri"},{description:"The Signal-to-Distortion ratio is the relationship between the target signal and the sum of noise, interference, and artifact errors",id:"sdri"}],models:[{description:"A speech enhancement model.",id:"ResembleAI/resemble-enhance"},{description:"A model that can change the voice in a speech recording.",id:"microsoft/speecht5_vc"}],spaces:[{description:"An application for speech separation.",id:"younver/speechbrain-speech-separation"},{description:"An application for audio style transfer.",id:"nakas/audio-diffusion_style_transfer"}],summary:"Audio-to-Audio is a family of tasks in which the input is an audio and the output is one or multiple generated audios. Some example tasks are speech enhancement and source separation.",widgetModels:["speechbrain/sepformer-wham"],youtubeId:"iohj7nCCYoM"}),C("audio-text-to-text",{datasets:[{description:"A dataset containing audio conversations with question–answer pairs.",id:"nvidia/AF-Think"},{description:"A more advanced and comprehensive dataset that contains characteristics of the audio as well",id:"tsinghua-ee/QualiSpeech"}],demo:{inputs:[{filename:"audio.wav",type:"audio"},{label:"Text Prompt",content:"What is the gender of the speaker?",type:"text"}],outputs:[{label:"Generated Text",content:"The gender of the speaker is female.",type:"text"}]},metrics:[],models:[{description:"A lightweight model that has capabilities of taking both audio and text as inputs and generating responses.",id:"fixie-ai/ultravox-v0_5-llama-3_2-1b"},{description:"A multimodal model that supports voice chat and audio analysis.",id:"Qwen/Qwen2-Audio-7B-Instruct"},{description:"A model for audio understanding, speech translation, and transcription.",id:"mistralai/Voxtral-Small-24B-2507"},{description:"A new model capable of audio question answering and reasoning.",id:"nvidia/audio-flamingo-3"}],spaces:[{description:"A space that takes input as both audio and text and generates answers.",id:"iamomtiwari/ATTT"},{description:"A web application that demonstrates chatting with the Qwen2Audio Model.",id:"freddyaboulton/talk-to-qwen-webrtc"}],summary:"Audio-text-to-text models take both an audio clip and a text prompt as input, and generate natural language text as output. These models can answer questions about spoken content, summarize meetings, analyze music, or interpret speech beyond simple transcription. They are useful for applications that combine speech understanding with reasoning or conversation.",widgetModels:[],youtubeId:""}),C("automatic-speech-recognition",{datasets:[{description:"31,175 hours of multilingual audio-text dataset in 108 languages.",id:"mozilla-foundation/common_voice_17_0"},{description:"Multilingual and diverse audio dataset with 101k hours of audio.",id:"amphion/Emilia-Dataset"},{description:"A dataset with 44.6k hours of English speaker data and 6k hours of other language speakers.",id:"parler-tts/mls_eng"},{description:"A multilingual audio dataset with 370K hours of audio.",id:"espnet/yodas"}],demo:{inputs:[{filename:"input.flac",type:"audio"}],outputs:[{label:"Transcript",content:"Going along slushy country roads and speaking to damp audiences in...",type:"text"}]},metrics:[{description:"",id:"wer"},{description:"",id:"cer"}],models:[{description:"A powerful ASR model by OpenAI.",id:"openai/whisper-large-v3"},{description:"A good generic speech model by MetaAI for fine-tuning.",id:"facebook/w2v-bert-2.0"},{description:"An end-to-end model that performs ASR and Speech Translation by MetaAI.",id:"facebook/seamless-m4t-v2-large"},{description:"A powerful multilingual ASR and Speech Translation model by Nvidia.",id:"nvidia/canary-1b"},{description:"Powerful speaker diarization model.",id:"pyannote/speaker-diarization-3.1"}],spaces:[{description:"A powerful general-purpose speech recognition application.",id:"hf-audio/whisper-large-v3"},{description:"Latest ASR model from Useful Sensors.",id:"mrfakename/Moonshinex"},{description:"A high quality speech and text translation model by Meta.",id:"facebook/seamless_m4t"},{description:"A powerful multilingual ASR and Speech Translation model by Nvidia",id:"nvidia/canary-1b"}],summary:"Automatic Speech Recognition (ASR), also known as Speech to Text (STT), is the task of transcribing a given audio to text. It has many applications, such as voice user interfaces.",widgetModels:["openai/whisper-large-v3"],youtubeId:"TksaY_FDgnk"}),C("depth-estimation",{datasets:[{description:"NYU Depth V2 Dataset: Video dataset containing both RGB and depth sensor data.",id:"sayakpaul/nyu_depth_v2"},{description:"Monocular depth estimation benchmark based without noise and errors.",id:"depth-anything/DA-2K"}],demo:{inputs:[{filename:"depth-estimation-input.jpg",type:"img"}],outputs:[{filename:"depth-estimation-output.png",type:"img"}]},metrics:[],models:[{description:"Cutting-edge depth estimation model.",id:"depth-anything/Depth-Anything-V2-Large"},{description:"A strong monocular depth estimation model.",id:"jingheya/lotus-depth-g-v1-0"},{description:"A depth estimation model that predicts depth in videos.",id:"tencent/DepthCrafter"},{description:"A robust depth estimation model.",id:"apple/DepthPro-hf"}],spaces:[{description:"An application that predicts the depth of an image and then reconstruct the 3D model as voxels.",id:"radames/dpt-depth-estimation-3d-voxels"},{description:"An application for bleeding-edge depth estimation.",id:"akhaliq/depth-pro"},{description:"An application on cutting-edge depth estimation in videos.",id:"tencent/DepthCrafter"},{description:"A human-centric depth estimation application.",id:"facebook/sapiens-depth"}],summary:"Depth estimation is the task of predicting depth of the objects present in an image.",widgetModels:[""],youtubeId:""}),C("document-question-answering",{datasets:[{description:"Largest document understanding dataset.",id:"HuggingFaceM4/Docmatix"},{description:"Dataset from the 2020 DocVQA challenge. The documents are taken from the UCSF Industry Documents Library.",id:"eliolio/docvqa"}],demo:{inputs:[{label:"Question",content:"What is the idea behind the consumer relations efficiency team?",type:"text"},{filename:"document-question-answering-input.png",type:"img"}],outputs:[{label:"Answer",content:"Balance cost efficiency with quality customer service",type:"text"}]},metrics:[{description:"The evaluation metric for the DocVQA challenge is the Average Normalized Levenshtein Similarity (ANLS). This metric is flexible to character regognition errors and compares the predicted answer with the ground truth answer.",id:"anls"},{description:"Exact Match is a metric based on the strict character match of the predicted answer and the right answer. For answers predicted correctly, the Exact Match will be 1. Even if only one character is different, Exact Match will be 0",id:"exact-match"}],models:[{description:"A robust document question answering model.",id:"impira/layoutlm-document-qa"},{description:"A document question answering model specialized in invoices.",id:"impira/layoutlm-invoices"},{description:"A special model for OCR-free document question answering.",id:"microsoft/udop-large"},{description:"A powerful model for document question answering.",id:"google/pix2struct-docvqa-large"}],spaces:[{description:"A robust document question answering application.",id:"impira/docquery"},{description:"An application that can answer questions from invoices.",id:"impira/invoices"},{description:"An application to compare different document question answering models.",id:"merve/compare_docvqa_models"}],summary:"Document Question Answering (also known as Document Visual Question Answering) is the task of answering questions on document images. Document question answering models take a (document, question) pair as input and return an answer in natural language. Models usually rely on multi-modal features, combining text, position of words (bounding-boxes) and image.",widgetModels:["impira/layoutlm-invoices"],youtubeId:""}),C("visual-document-retrieval",b),C("feature-extraction",n),C("fill-mask",r),C("image-classification",s),C("image-feature-extraction",u),C("image-segmentation",{datasets:[{description:"Scene segmentation dataset.",id:"scene_parse_150"}],demo:{inputs:[{filename:"image-segmentation-input.jpeg",type:"img"}],outputs:[{filename:"image-segmentation-output.png",type:"img"}]},metrics:[{description:"Average Precision (AP) is the Area Under the PR Curve (AUC-PR). It is calculated for each semantic class separately",id:"Average Precision"},{description:"Mean Average Precision (mAP) is the overall average of the AP values",id:"Mean Average Precision"},{description:"Intersection over Union (IoU) is the overlap of segmentation masks. Mean IoU is the average of the IoU of all semantic classes",id:"Mean Intersection over Union"},{description:"APα is the Average Precision at the IoU threshold of a α value, for example, AP50 and AP75",id:"APα"}],models:[{description:"Solid panoptic segmentation model trained on COCO.",id:"tue-mps/coco_panoptic_eomt_large_640"},{description:"Background removal model.",id:"briaai/RMBG-1.4"},{description:"A multipurpose image segmentation model for high resolution images.",id:"ZhengPeng7/BiRefNet"},{description:"Powerful human-centric image segmentation model.",id:"facebook/sapiens-seg-1b"},{description:"Panoptic segmentation model trained on the COCO (common objects) dataset.",id:"facebook/mask2former-swin-large-coco-panoptic"}],spaces:[{description:"A semantic segmentation application that can predict unseen instances out of the box.",id:"facebook/ov-seg"},{description:"One of the strongest segmentation applications.",id:"jbrinkma/segment-anything"},{description:"A human-centric segmentation model.",id:"facebook/sapiens-pose"},{description:"An instance segmentation application to predict neuronal cell types from microscopy images.",id:"rashmi/sartorius-cell-instance-segmentation"},{description:"An application that segments videos.",id:"ArtGAN/Segment-Anything-Video"},{description:"An panoptic segmentation application built for outdoor environments.",id:"segments/panoptic-segment-anything"}],summary:"Image Segmentation divides an image into segments where each pixel in the image is mapped to an object. This task has multiple variants such as instance segmentation, panoptic segmentation and semantic segmentation.",widgetModels:["nvidia/segformer-b0-finetuned-ade-512-512"],youtubeId:"dKE8SIt9C-w"}),C("image-to-image",{datasets:[{description:"Synthetic dataset, for image relighting",id:"VIDIT"},{description:"Multiple images of celebrities, used for facial expression translation",id:"huggan/CelebA-faces"},{description:"12M image-caption pairs.",id:"Spawning/PD12M"}],demo:{inputs:[{filename:"image-to-image-input.jpeg",type:"img"}],outputs:[{filename:"image-to-image-output.png",type:"img"}]},isPlaceholder:!1,metrics:[{description:"Peak Signal to Noise Ratio (PSNR) is an approximation of the human perception, considering the ratio of the absolute intensity with respect to the variations. Measured in dB, a high value indicates a high fidelity.",id:"PSNR"},{description:"Structural Similarity Index (SSIM) is a perceptual metric which compares the luminance, contrast and structure of two images. The values of SSIM range between -1 and 1, and higher values indicate closer resemblance to the original image.",id:"SSIM"},{description:"Inception Score (IS) is an analysis of the labels predicted by an image classification model when presented with a sample of the generated images.",id:"IS"}],models:[{description:"An image-to-image model to improve image resolution.",id:"fal/AuraSR-v2"},{description:"Powerful image editing model.",id:"black-forest-labs/FLUX.1-Kontext-dev"},{description:"Virtual try-on model.",id:"yisol/IDM-VTON"},{description:"Image re-lighting model.",id:"kontext-community/relighting-kontext-dev-lora-v3"},{description:"Strong model for inpainting and outpainting.",id:"black-forest-labs/FLUX.1-Fill-dev"},{description:"Strong model for image editing using depth maps.",id:"black-forest-labs/FLUX.1-Depth-dev-lora"}],spaces:[{description:"Image editing application.",id:"black-forest-labs/FLUX.1-Kontext-Dev"},{description:"Image relighting application.",id:"lllyasviel/iclight-v2-vary"},{description:"An application for image upscaling.",id:"jasperai/Flux.1-dev-Controlnet-Upscaler"}],summary:"Image-to-image is the task of transforming an input image through a variety of possible manipulations and enhancements, such as super-resolution, image inpainting, colorization, and more.",widgetModels:["Qwen/Qwen-Image"],youtubeId:""}),C("image-text-to-text",{datasets:[{description:"Instructions composed of image and text.",id:"liuhaotian/LLaVA-Instruct-150K"},{description:"Collection of image-text pairs on scientific topics.",id:"DAMO-NLP-SG/multimodal_textbook"},{description:"A collection of datasets made for model fine-tuning.",id:"HuggingFaceM4/the_cauldron"},{description:"Screenshots of websites with their HTML/CSS codes.",id:"HuggingFaceM4/WebSight"}],demo:{inputs:[{filename:"image-text-to-text-input.png",type:"img"},{label:"Text Prompt",content:"Describe the position of the bee in detail.",type:"text"}],outputs:[{label:"Answer",content:"The bee is sitting on a pink flower, surrounded by other flowers. The bee is positioned in the center of the flower, with its head and front legs sticking out.",type:"text"}]},metrics:[],models:[{description:"Small and efficient yet powerful vision language model.",id:"HuggingFaceTB/SmolVLM-Instruct"},{description:"Cutting-edge reasoning vision language model.",id:"zai-org/GLM-4.5V"},{description:"Cutting-edge small vision language model to convert documents to text.",id:"rednote-hilab/dots.ocr"},{description:"Small yet powerful model.",id:"Qwen/Qwen2.5-VL-3B-Instruct"},{description:"Image-text-to-text model with agentic capabilities.",id:"microsoft/Magma-8B"}],spaces:[{description:"Leaderboard to evaluate vision language models.",id:"opencompass/open_vlm_leaderboard"},{description:"An application that compares object detection capabilities of different vision language models.",id:"sergiopaniego/vlm_object_understanding"},{description:"An application to compare different OCR models.",id:"prithivMLmods/Multimodal-OCR"}],summary:"Image-text-to-text models take in an image and text prompt and output text. These models are also called vision-language models, or VLMs. The difference from image-to-text models is that these models take an additional text input, not restricting the model to certain use cases like image captioning, and may also be trained to accept a conversation as input.",widgetModels:["zai-org/GLM-4.5V"],youtubeId:"IoGaGfU1CIg"}),C("image-text-to-image",{datasets:[],demo:{inputs:[{filename:"image-text-to-image-input.jpeg",type:"img"},{label:"Input",content:"A city above clouds, pastel colors, Victorian style",type:"text"}],outputs:[{filename:"image-text-to-image-output.png",type:"img"}]},metrics:[{description:"The Fr\xe9chet Inception Distance (FID) calculates the distance between distributions between synthetic and real samples. A lower FID score indicates better similarity between the distributions of real and generated images.",id:"FID"},{description:"CLIP Score measures the similarity between the generated image and the text prompt using CLIP embeddings. A higher score indicates better alignment with the text prompt.",id:"CLIP"}],models:[{description:"A powerful model for image-text-to-image generation.",id:"black-forest-labs/FLUX.2-dev"}],spaces:[{description:"An application for image-text-to-image generation.",id:"black-forest-labs/FLUX.2-dev"}],summary:"Image-text-to-image models take an image and a text prompt as input and generate a new image based on the reference image and text instructions. These models are useful for image editing, style transfer, image variations, and guided image generation tasks.",widgetModels:["black-forest-labs/FLUX.2-dev"],youtubeId:void 0}),C("image-text-to-video",{datasets:[],demo:{inputs:[{filename:"image-text-to-video-input.jpg",type:"img"},{label:"Input",content:"Darth Vader is surfing on the waves.",type:"text"}],outputs:[{filename:"image-text-to-video-output.gif",type:"img"}]},metrics:[{description:"Frechet Video Distance uses a model that captures coherence for changes in frames and the quality of each frame. A smaller score indicates better video generation.",id:"fvd"},{description:"CLIPSIM measures similarity between video frames and text using an image-text similarity model. A higher score indicates better video generation.",id:"clipsim"}],models:[{description:"A powerful model for image-text-to-video generation.",id:"Lightricks/LTX-Video"}],spaces:[{description:"An application for image-text-to-video generation.",id:"Lightricks/ltx-video-distilled"}],summary:"Image-text-to-video models take an reference image and a text instructions as and generate a video based on them. These models are useful for animating still images, creating dynamic content from static references, and generating videos with specific motion or transformation guidance.",widgetModels:["Lightricks/LTX-Video"],youtubeId:void 0}),C("image-to-text",{datasets:[{description:"Dataset from 12M image-text of Reddit",id:"red_caps"},{description:"Dataset from 3.3M images of Google",id:"datasets/conceptual_captions"}],demo:{inputs:[{filename:"savanna.jpg",type:"img"}],outputs:[{label:"Detailed description",content:"a herd of giraffes and zebras grazing in a field",type:"text"}]},metrics:[],models:[{description:"Strong OCR model.",id:"allenai/olmOCR-7B-0725"},{description:"Powerful image captioning model.",id:"fancyfeast/llama-joycaption-beta-one-hf-llava"}],spaces:[{description:"SVG generator app from images.",id:"multimodalart/OmniSVG-3B"},{description:"An application that converts documents to markdown.",id:"numind/NuMarkdown-8B-Thinking"},{description:"An application that can caption images.",id:"fancyfeast/joy-caption-beta-one"}],summary:"Image to text models output a text from a given image. Image captioning or optical character recognition can be considered as the most common applications of image to text.",widgetModels:["Salesforce/blip-image-captioning-large"],youtubeId:""}),C("image-to-video",{datasets:[{description:"A benchmark dataset for reference image controlled video generation.",id:"ali-vilab/VACE-Benchmark"},{description:"A dataset of video generation style preferences.",id:"Rapidata/sora-video-generation-style-likert-scoring"},{description:"A dataset with videos and captions throughout the videos.",id:"BestWishYsh/ChronoMagic"}],demo:{inputs:[{filename:"image-to-video-input.jpg",type:"img"},{label:"Optional Text Prompt",content:"This penguin is dancing",type:"text"}],outputs:[{filename:"image-to-video-output.gif",type:"img"}]},metrics:[{description:"Fr\xe9chet Video Distance (FVD) measures the perceptual similarity between the distributions of generated videos and a set of real videos, assessing overall visual quality and temporal coherence of the video generated from an input image.",id:"fvd"},{description:"CLIP Score measures the semantic similarity between a textual prompt (if provided alongside the input image) and the generated video frames. It evaluates how well the video's generated content and motion align with the textual description, conditioned on the initial image.",id:"clip_score"},{description:"First Frame Fidelity, often measured using LPIPS (Learned Perceptual Image Patch Similarity), PSNR, or SSIM, quantifies how closely the first frame of the generated video matches the input conditioning image.",id:"lpips"},{description:"Identity Preservation Score measures the consistency of identity (e.g., a person's face or a specific object's characteristics) between the input image and throughout the generated video frames, often calculated using features from specialized models like face recognition (e.g., ArcFace) or re-identification models.",id:"identity_preservation"},{description:"Motion Score evaluates the quality, realism, and temporal consistency of motion in the video generated from a static image. This can be based on optical flow analysis (e.g., smoothness, magnitude), consistency of object trajectories, or specific motion plausibility assessments.",id:"motion_score"}],models:[{description:"LTX-Video, a 13B parameter model for high quality video generation",id:"Lightricks/LTX-Video-0.9.7-dev"},{description:"A 14B parameter model for reference image controlled video generation",id:"Wan-AI/Wan2.1-VACE-14B"},{description:"An image-to-video generation model using FramePack F1 methodology with Hunyuan-DiT architecture",id:"lllyasviel/FramePack_F1_I2V_HY_20250503"},{description:"A distilled version of the LTX-Video-0.9.7-dev model for faster inference",id:"Lightricks/LTX-Video-0.9.7-distilled"},{description:"An image-to-video generation model by Skywork AI, 14B parameters, producing 720p videos.",id:"Skywork/SkyReels-V2-I2V-14B-720P"},{description:"Image-to-video variant of Tencent's HunyuanVideo.",id:"tencent/HunyuanVideo-I2V"},{description:"A 14B parameter model for 720p image-to-video generation by Wan-AI.",id:"Wan-AI/Wan2.1-I2V-14B-720P"},{description:"A Diffusers version of the Wan2.1-I2V-14B-720P model for 720p image-to-video generation.",id:"Wan-AI/Wan2.1-I2V-14B-720P-Diffusers"}],spaces:[{description:"An application to generate videos fast.",id:"Lightricks/ltx-video-distilled"},{description:"Generate videos with the FramePack-F1",id:"linoyts/FramePack-F1"},{description:"Generate videos with the FramePack",id:"lisonallen/framepack-i2v"},{description:"Wan2.1 with CausVid LoRA",id:"multimodalart/wan2-1-fast"},{description:"A demo for Stable Video Diffusion",id:"multimodalart/stable-video-diffusion"}],summary:"Image-to-video models take a still image as input and generate a video. These models can be guided by text prompts to influence the content and style of the output video.",widgetModels:[],youtubeId:void 0}),C("keypoint-detection",{datasets:[{description:"A dataset of hand keypoints of over 500k examples.",id:"Vincent-luo/hagrid-mediapipe-hands"}],demo:{inputs:[{filename:"keypoint-detection-input.png",type:"img"}],outputs:[{filename:"keypoint-detection-output.png",type:"img"}]},metrics:[],models:[{description:"A robust keypoint detection model.",id:"magic-leap-community/superpoint"},{description:"A robust keypoint matching model.",id:"magic-leap-community/superglue_outdoor"},{description:"Strong keypoint detection model used to detect human pose.",id:"qualcomm/RTMPose-Body2d"},{description:"Powerful keypoint matching model.",id:"ETH-CVG/lightglue_disk"}],spaces:[{description:"An application that detects hand keypoints in real-time.",id:"datasciencedojo/Hand-Keypoint-Detection-Realtime"},{description:"An application for keypoint detection and matching.",id:"ETH-CVG/LightGlue"}],summary:"Keypoint detection is the task of identifying meaningful distinctive points or features in an image.",widgetModels:[],youtubeId:""}),C("mask-generation",{datasets:[{description:"Widely used benchmark dataset for multiple Vision tasks.",id:"merve/coco2017"},{description:"Medical Imaging dataset of the Human Brain for segmentation and mask generating tasks",id:"rocky93/BraTS_segmentation"}],demo:{inputs:[{filename:"mask-generation-input.png",type:"img"}],outputs:[{filename:"mask-generation-output.png",type:"img"}]},metrics:[{description:"IoU is used to measure the overlap between predicted mask and the ground truth mask.",id:"Intersection over Union (IoU)"}],models:[{description:"Small yet powerful mask generation model.",id:"Zigeng/SlimSAM-uniform-50"},{description:"Very strong mask generation model.",id:"facebook/sam2-hiera-large"}],spaces:[{description:"An application that combines a mask generation model with a zero-shot object detection model for text-guided image segmentation.",id:"merve/OWLSAM2"},{description:"An application that compares the performance of a large and a small mask generation model.",id:"merve/slimsam"},{description:"An application based on an improved mask generation model.",id:"SkalskiP/segment-anything-model-2"},{description:"An application to remove objects from videos using mask generation models.",id:"SkalskiP/SAM_and_ProPainter"}],summary:"Mask generation is the task of generating masks that identify a specific object or region of interest in a given image. Masks are often used in segmentation tasks, where they provide a precise way to isolate the object of interest for further processing or analysis.",widgetModels:[],youtubeId:""}),C("object-detection",{datasets:[{description:"Widely used benchmark dataset for multiple vision tasks.",id:"merve/coco2017"},{description:"Multi-task computer vision benchmark.",id:"merve/pascal-voc"}],demo:{inputs:[{filename:"object-detection-input.jpg",type:"img"}],outputs:[{filename:"object-detection-output.jpg",type:"img"}]},metrics:[{description:"The Average Precision (AP) metric is the Area Under the PR Curve (AUC-PR). It is calculated for each class separately",id:"Average Precision"},{description:"The Mean Average Precision (mAP) metric is the overall average of the AP values",id:"Mean Average Precision"},{description:"The APα metric is the Average Precision at the IoU threshold of a α value, for example, AP50 and AP75",id:"APα"}],models:[{description:"Solid object detection model pre-trained on the COCO 2017 dataset.",id:"facebook/detr-resnet-50"},{description:"Accurate object detection model.",id:"IDEA-Research/dab-detr-resnet-50"},{description:"Fast and accurate object detection model.",id:"PekingU/rtdetr_v2_r50vd"},{description:"Object detection model for low-lying objects.",id:"StephanST/WALDO30"}],spaces:[{description:"Real-time object detection demo.",id:"Roboflow/RF-DETR"},{description:"An application that contains various object detection models to try from.",id:"Gradio-Blocks/Object-Detection-With-DETR-and-YOLOS"},{description:"A cutting-edge object detection application.",id:"sunsmarterjieleaf/yolov12"},{description:"An object tracking, segmentation and inpainting application.",id:"VIPLab/Track-Anything"},{description:"Very fast object tracking application based on object detection.",id:"merve/RT-DETR-tracking-coco"}],summary:"Object Detection models allow users to identify objects of certain defined classes. Object detection models receive an image as input and output the images with bounding boxes and labels on detected objects.",widgetModels:["facebook/detr-resnet-50"],youtubeId:"WdAeKSOpxhw"}),C("video-classification",D),C("question-answering",{datasets:[{description:"A famous question answering dataset based on English articles from Wikipedia.",id:"squad_v2"},{description:"A dataset of aggregated anonymized actual queries issued to the Google search engine.",id:"natural_questions"}],demo:{inputs:[{label:"Question",content:"Which name is also used to describe the Amazon rainforest in English?",type:"text"},{label:"Context",content:"The Amazon rainforest, also known in English as Amazonia or the Amazon Jungle",type:"text"}],outputs:[{label:"Answer",content:"Amazonia",type:"text"}]},metrics:[{description:"Exact Match is a metric based on the strict character match of the predicted answer and the right answer. For answers predicted correctly, the Exact Match will be 1. Even if only one character is different, Exact Match will be 0",id:"exact-match"},{description:" The F1-Score metric is useful if we value both false positives and false negatives equally. The F1-Score is calculated on each word in the predicted sequence against the correct answer",id:"f1"}],models:[{description:"A robust baseline model for most question answering domains.",id:"deepset/roberta-base-squad2"},{description:"Small yet robust model that can answer questions.",id:"distilbert/distilbert-base-cased-distilled-squad"},{description:"A special model that can answer questions from tables.",id:"google/tapas-base-finetuned-wtq"}],spaces:[{description:"An application that can answer a long question from Wikipedia.",id:"deepset/wikipedia-assistant"}],summary:"Question Answering models can retrieve the answer to a question from a given text, which is useful for searching for an answer in a document. Some question answering models can generate answers without context!",widgetModels:["deepset/roberta-base-squad2"],youtubeId:"ajPx5LwJD-I"}),C("reinforcement-learning",{datasets:[{description:"A curation of widely used datasets for Data Driven Deep Reinforcement Learning (D4RL)",id:"edbeeching/decision_transformer_gym_replay"}],demo:{inputs:[{label:"State",content:"Red traffic light, pedestrians are about to pass.",type:"text"}],outputs:[{label:"Action",content:"Stop the car.",type:"text"},{label:"Next State",content:"Yellow light, pedestrians have crossed.",type:"text"}]},metrics:[{description:"Accumulated reward across all time steps discounted by a factor that ranges between 0 and 1 and determines how much the agent optimizes for future relative to immediate rewards. Measures how good is the policy ultimately found by a given algorithm considering uncertainty over the future.",id:"Discounted Total Reward"},{description:"Average return obtained after running the policy for a certain number of evaluation episodes. As opposed to total reward, mean reward considers how much reward a given algorithm receives while learning.",id:"Mean Reward"},{description:"Measures how good a given algorithm is after a predefined time. Some algorithms may be guaranteed to converge to optimal behavior across many time steps. However, an agent that reaches an acceptable level of optimality after a given time horizon may be preferable to one that ultimately reaches optimality but takes a long time.",id:"Level of Performance After Some Time"}],models:[{description:"A Reinforcement Learning model trained on expert data from the Gym Hopper environment",id:"edbeeching/decision-transformer-gym-hopper-expert"},{description:"A PPO agent playing seals/CartPole-v0 using the stable-baselines3 library and the RL Zoo.",id:"HumanCompatibleAI/ppo-seals-CartPole-v0"}],spaces:[{description:"An application for a cute puppy agent learning to catch a stick.",id:"ThomasSimonini/Huggy"},{description:"An application to play Snowball Fight with a reinforcement learning agent.",id:"ThomasSimonini/SnowballFight"}],summary:"Reinforcement learning is the computational approach of learning from action by interacting with an environment through trial and error and receiving rewards (negative or positive) as feedback",widgetModels:[],youtubeId:"q0BiUn5LiBc"}),C("sentence-similarity",d),C("summarization",{canonicalId:"text-generation",datasets:[{description:"News articles in five different languages along with their summaries. Widely used for benchmarking multilingual summarization models.",id:"mlsum"},{description:"English conversations and their summaries. Useful for benchmarking conversational agents.",id:"samsum"}],demo:{inputs:[{label:"Input",content:"The tower is 324 metres (1,063 ft) tall, about the same height as an 81-storey building, and the tallest structure in Paris. Its base is square, measuring 125 metres (410 ft) on each side. It was the first structure to reach a height of 300 metres. Excluding transmitters, the Eiffel Tower is the second tallest free-standing structure in France after the Millau Viaduct.",type:"text"}],outputs:[{label:"Output",content:"The tower is 324 metres (1,063 ft) tall, about the same height as an 81-storey building. It was the first structure to reach a height of 300 metres.",type:"text"}]},metrics:[{description:"The generated sequence is compared against its summary, and the overlap of tokens are counted. ROUGE-N refers to overlap of N subsequent tokens, ROUGE-1 refers to overlap of single tokens and ROUGE-2 is the overlap of two subsequent tokens.",id:"rouge"}],models:[{description:"A strong summarization model trained on English news articles. Excels at generating factual summaries.",id:"facebook/bart-large-cnn"},{description:"A summarization model trained on medical articles.",id:"Falconsai/medical_summarization"}],spaces:[{description:"An application that can summarize long paragraphs.",id:"pszemraj/summarize-long-text"},{description:"A much needed summarization application for terms and conditions.",id:"ml6team/distilbart-tos-summarizer-tosdr"},{description:"An application that summarizes long documents.",id:"pszemraj/document-summarization"},{description:"An application that can detect errors in abstractive summarization.",id:"ml6team/post-processing-summarization"}],summary:"Summarization is the task of producing a shorter version of a document while preserving its important information. Some models can extract text from the original input, while other models can generate entirely new text.",widgetModels:["facebook/bart-large-cnn"],youtubeId:"yHnr5Dk2zCI"}),C("table-question-answering",c),C("tabular-classification",p),C("tabular-regression",m),C("text-classification",g),C("text-generation",{datasets:[{description:"Multilingual dataset used to evaluate text generation models.",id:"CohereForAI/Global-MMLU"},{description:"High quality multilingual data used to train text-generation models.",id:"HuggingFaceFW/fineweb-2"},{description:"Truly open-source, curated and cleaned dialogue dataset.",id:"HuggingFaceH4/ultrachat_200k"},{description:"A reasoning dataset.",id:"open-r1/OpenThoughts-114k-math"},{description:"A multilingual instruction dataset with preference ratings on responses.",id:"allenai/tulu-3-sft-mixture"},{description:"A large synthetic dataset for alignment of text generation models.",id:"HuggingFaceTB/smoltalk"},{description:"A dataset made for training text generation models solving math questions.",id:"HuggingFaceTB/finemath"}],demo:{inputs:[{label:"Input",content:"Once upon a time,",type:"text"}],outputs:[{label:"Output",content:"Once upon a time, we knew that our ancestors were on the verge of extinction. The great explorers and poets of the Old World, from Alexander the Great to Chaucer, are dead and gone. A good many of our ancient explorers and poets have",type:"text"}]},metrics:[{description:"Cross Entropy is a metric that calculates the difference between two probability distributions. Each probability distribution is the distribution of predicted words",id:"Cross Entropy"},{description:"The Perplexity metric is the exponential of the cross-entropy loss. It evaluates the probabilities assigned to the next word by the model. Lower perplexity indicates better performance",id:"Perplexity"}],models:[{description:"A text-generation model trained to follow instructions.",id:"google/gemma-2-2b-it"},{description:"Powerful text generation model for coding.",id:"Qwen/Qwen3-Coder-480B-A35B-Instruct"},{description:"Great text generation model with top-notch tool calling capabilities.",id:"openai/gpt-oss-120b"},{description:"Powerful text generation model.",id:"zai-org/GLM-4.5"},{description:"A powerful small model with reasoning capabilities.",id:"Qwen/Qwen3-4B-Thinking-2507"},{description:"Strong conversational model that supports very long instructions.",id:"Qwen/Qwen2.5-7B-Instruct-1M"},{description:"Text generation model used to write code.",id:"Qwen/Qwen2.5-Coder-32B-Instruct"},{description:"Powerful reasoning based open large language model.",id:"deepseek-ai/DeepSeek-R1"}],spaces:[{description:"An application that writes and executes code from text instructions and supports many models.",id:"akhaliq/anycoder"},{description:"An application that builds websites from natural language prompts.",id:"enzostvs/deepsite"},{description:"A leaderboard for comparing chain-of-thought performance of models.",id:"logikon/open_cot_leaderboard"},{description:"An text generation based application based on a very powerful LLaMA2 model.",id:"ysharma/Explore_llamav2_with_TGI"},{description:"An text generation based application to converse with Zephyr model.",id:"HuggingFaceH4/zephyr-chat"},{description:"A leaderboard that ranks text generation models based on blind votes from people.",id:"lmsys/chatbot-arena-leaderboard"},{description:"An chatbot to converse with a very powerful text generation model.",id:"mlabonne/phixtral-chat"}],summary:"Generating text is the task of generating new text given another text. These models can, for example, fill in incomplete text or paraphrase.",widgetModels:["mistralai/Mistral-Nemo-Instruct-2407"],youtubeId:"e9gNEAlsOvU"}),C("text-ranking",f),C("text-to-image",{datasets:[{description:"RedCaps is a large-scale dataset of 12M image-text pairs collected from Reddit.",id:"red_caps"},{description:"Conceptual Captions is a dataset consisting of ~3.3M images annotated with captions.",id:"conceptual_captions"},{description:"12M image-caption pairs.",id:"Spawning/PD12M"}],demo:{inputs:[{label:"Input",content:"A city above clouds, pastel colors, Victorian style",type:"text"}],outputs:[{filename:"image.jpeg",type:"img"}]},metrics:[{description:"The Inception Score (IS) measure assesses diversity and meaningfulness. It uses a generated image sample to predict its label. A higher score signifies more diverse and meaningful images.",id:"IS"},{description:"The Fr\xe9chet Inception Distance (FID) calculates the distance between distributions between synthetic and real samples. A lower FID score indicates better similarity between the distributions of real and generated images.",id:"FID"},{description:"R-precision assesses how the generated image aligns with the provided text description. It uses the generated images as queries to retrieve relevant text descriptions. The top 'r' relevant descriptions are selected and used to calculate R-precision as r/R, where 'R' is the number of ground truth descriptions associated with the generated images. A higher R-precision value indicates a better model.",id:"R-Precision"}],models:[{description:"One of the most powerful image generation models that can generate realistic outputs.",id:"black-forest-labs/FLUX.1-Krea-dev"},{description:"A powerful image generation model.",id:"Qwen/Qwen-Image"},{description:"Powerful and fast image generation model.",id:"ByteDance/SDXL-Lightning"},{description:"A powerful text-to-image model.",id:"ByteDance/Hyper-SD"}],spaces:[{description:"A powerful text-to-image application.",id:"stabilityai/stable-diffusion-3-medium"},{description:"A text-to-image application to generate comics.",id:"jbilcke-hf/ai-comic-factory"},{description:"An application to match multiple custom image generation models.",id:"multimodalart/flux-lora-lab"},{description:"A powerful yet very fast image generation application.",id:"latent-consistency/lcm-lora-for-sdxl"},{description:"A gallery to explore various text-to-image models.",id:"multimodalart/LoraTheExplorer"},{description:"An application for `text-to-image`, `image-to-image` and image inpainting.",id:"ArtGAN/Stable-Diffusion-ControlNet-WebUI"},{description:"An application to generate realistic images given photos of a person and a prompt.",id:"InstantX/InstantID"}],summary:"Text-to-image is the task of generating images from input text. These pipelines can also be used to modify and edit images based on text prompts.",widgetModels:["black-forest-labs/FLUX.1-dev"],youtubeId:""}),C("text-to-speech",{canonicalId:"text-to-audio",datasets:[{description:"10K hours of multi-speaker English dataset.",id:"parler-tts/mls_eng_10k"},{description:"Multi-speaker English dataset.",id:"mythicinfinity/libritts_r"},{description:"Multi-lingual dataset.",id:"facebook/multilingual_librispeech"}],demo:{inputs:[{label:"Input",content:"I love audio models on the Hub!",type:"text"}],outputs:[{filename:"audio.wav",type:"audio"}]},metrics:[{description:"The Mel Cepstral Distortion (MCD) metric is used to calculate the quality of generated speech.",id:"mel cepstral distortion"}],models:[{description:"Small yet powerful TTS model.",id:"KittenML/kitten-tts-nano-0.1"},{description:"Bleeding edge TTS model.",id:"ResembleAI/chatterbox"},{description:"A massively multi-lingual TTS model.",id:"fishaudio/fish-speech-1.5"},{description:"A text-to-dialogue model.",id:"nari-labs/Dia-1.6B-0626"}],spaces:[{description:"An application for generate high quality speech in different languages.",id:"hexgrad/Kokoro-TTS"},{description:"A multilingual text-to-speech application.",id:"fishaudio/fish-speech-1"},{description:"Performant TTS application.",id:"ResembleAI/Chatterbox"},{description:"An application to compare different TTS models.",id:"TTS-AGI/TTS-Arena-V2"},{description:"An application that generates podcast episodes.",id:"ngxson/kokoro-podcast-generator"}],summary:"Text-to-Speech (TTS) is the task of generating natural sounding speech given text input. TTS models can be extended to have a single model that generates speech for multiple speakers and multiple languages.",widgetModels:["suno/bark"],youtubeId:"NW62DpzJ274"}),C("text-to-video",{datasets:[{description:"Microsoft Research Video to Text is a large-scale dataset for open domain video captioning",id:"iejMac/CLIP-MSR-VTT"},{description:"UCF101 Human Actions dataset consists of 13,320 video clips from YouTube, with 101 classes.",id:"quchenyuan/UCF101-ZIP"},{description:"A high-quality dataset for human action recognition in YouTube videos.",id:"nateraw/kinetics"},{description:"A dataset of video clips of humans performing pre-defined basic actions with everyday objects.",id:"HuggingFaceM4/something_something_v2"},{description:"This dataset consists of text-video pairs and contains noisy samples with irrelevant video descriptions",id:"HuggingFaceM4/webvid"},{description:"A dataset of short Flickr videos for the temporal localization of events with descriptions.",id:"iejMac/CLIP-DiDeMo"}],demo:{inputs:[{label:"Input",content:"Darth Vader is surfing on the waves.",type:"text"}],outputs:[{filename:"text-to-video-output.gif",type:"img"}]},metrics:[{description:"Inception Score uses an image classification model that predicts class labels and evaluates how distinct and diverse the images are. A higher score indicates better video generation.",id:"is"},{description:"Frechet Inception Distance uses an image classification model to obtain image embeddings. The metric compares mean and standard deviation of the embeddings of real and generated images. A smaller score indicates better video generation.",id:"fid"},{description:"Frechet Video Distance uses a model that captures coherence for changes in frames and the quality of each frame. A smaller score indicates better video generation.",id:"fvd"},{description:"CLIPSIM measures similarity between video frames and text using an image-text similarity model. A higher score indicates better video generation.",id:"clipsim"}],models:[{description:"A strong model for consistent video generation.",id:"tencent/HunyuanVideo"},{description:"A text-to-video model with high fidelity motion and strong prompt adherence.",id:"Lightricks/LTX-Video"},{description:"A text-to-video model focusing on physics-aware applications like robotics.",id:"nvidia/Cosmos-1.0-Diffusion-7B-Text2World"},{description:"Very fast model for video generation.",id:"Lightricks/LTX-Video-0.9.8-13B-distilled"}],spaces:[{description:"An application that generates video from text.",id:"VideoCrafter/VideoCrafter"},{description:"Consistent video generation application.",id:"Wan-AI/Wan2.1"},{description:"A cutting edge video generation application.",id:"Pyramid-Flow/pyramid-flow"}],summary:"Text-to-video models can be used in any application that requires generating consistent sequence of images from text. ",widgetModels:["Wan-AI/Wan2.2-TI2V-5B"],youtubeId:void 0}),C("token-classification",h),C("translation",{canonicalId:"text-generation",datasets:[{description:"A dataset of copyright-free books translated into 16 different languages.",id:"Helsinki-NLP/opus_books"},{description:"An example of translation between programming languages. This dataset consists of functions in Java and C#.",id:"google/code_x_glue_cc_code_to_code_trans"}],demo:{inputs:[{label:"Input",content:"My name is Omar and I live in Z\xfcrich.",type:"text"}],outputs:[{label:"Output",content:"Mein Name ist Omar und ich wohne in Z\xfcrich.",type:"text"}]},metrics:[{description:"BLEU score is calculated by counting the number of shared single or subsequent tokens between the generated sequence and the reference. Subsequent n tokens are called “n-grams”. Unigram refers to a single token while bi-gram refers to token pairs and n-grams refer to n subsequent tokens. The score ranges from 0 to 1, where 1 means the translation perfectly matched and 0 did not match at all",id:"bleu"},{description:"",id:"sacrebleu"}],models:[{description:"Very powerful model that can translate many languages between each other, especially low-resource languages.",id:"facebook/nllb-200-1.3B"},{description:"A general-purpose Transformer that can be used to translate from English to German, French, or Romanian.",id:"google-t5/t5-base"}],spaces:[{description:"An application that can translate between 100 languages.",id:"Iker/Translate-100-languages"},{description:"An application that can translate between many languages.",id:"Geonmo/nllb-translation-demo"}],summary:"Translation is the task of converting text from one language to another.",widgetModels:["facebook/mbart-large-50-many-to-many-mmt"],youtubeId:"1JvfrvZgi6c"}),C("unconditional-image-generation",{datasets:[{description:"The CIFAR-100 dataset consists of 60000 32x32 colour images in 100 classes, with 600 images per class.",id:"cifar100"},{description:"Multiple images of celebrities, used for facial expression translation.",id:"CelebA"}],demo:{inputs:[{label:"Seed",content:"42",type:"text"},{label:"Number of images to generate:",content:"4",type:"text"}],outputs:[{filename:"unconditional-image-generation-output.jpeg",type:"img"}]},metrics:[{description:"The inception score (IS) evaluates the quality of generated images. It measures the diversity of the generated images (the model predictions are evenly distributed across all possible labels) and their 'distinction' or 'sharpness' (the model confidently predicts a single label for each image).",id:"Inception score (IS)"},{description:"The Fr\xe9chet Inception Distance (FID) evaluates the quality of images created by a generative model by calculating the distance between feature vectors for real and generated images.",id:"Frećhet Inception Distance (FID)"}],models:[{description:"High-quality image generation model trained on the CIFAR-10 dataset. It synthesizes images of the ten classes presented in the dataset using diffusion probabilistic models, a class of latent variable models inspired by considerations from nonequilibrium thermodynamics.",id:"google/ddpm-cifar10-32"},{description:"High-quality image generation model trained on the 256x256 CelebA-HQ dataset. It synthesizes images of faces using diffusion probabilistic models, a class of latent variable models inspired by considerations from nonequilibrium thermodynamics.",id:"google/ddpm-celebahq-256"}],spaces:[{description:"An application that can generate realistic faces.",id:"CompVis/celeba-latent-diffusion"}],summary:"Unconditional image generation is the task of generating images with no condition in any context (like a prompt text or another image). Once trained, the model will create images that resemble its training data distribution.",widgetModels:[""],youtubeId:""}),C("video-text-to-text",{datasets:[{description:"Multiple-choice questions and answers about videos.",id:"lmms-lab/Video-MME"},{description:"A dataset of instructions and question-answer pairs about videos.",id:"lmms-lab/VideoChatGPT"},{description:"Large video understanding dataset.",id:"HuggingFaceFV/finevideo"}],demo:{inputs:[{filename:"video-text-to-text-input.gif",type:"img"},{label:"Text Prompt",content:"What is happening in this video?",type:"text"}],outputs:[{label:"Answer",content:"The video shows a series of images showing a fountain with water jets and a variety of colorful flowers and butterflies in the background.",type:"text"}]},metrics:[],models:[{description:"A robust video-text-to-text model.",id:"Vision-CAIR/LongVU_Qwen2_7B"},{description:"Strong video-text-to-text model with reasoning capabilities.",id:"GoodiesHere/Apollo-LMMs-Apollo-7B-t32"},{description:"Strong video-text-to-text model.",id:"HuggingFaceTB/SmolVLM2-2.2B-Instruct"}],spaces:[{description:"An application to chat with a video-text-to-text model.",id:"llava-hf/video-llava"},{description:"A leaderboard for various video-text-to-text models.",id:"opencompass/openvlm_video_leaderboard"},{description:"An application to generate highlights from a video.",id:"HuggingFaceTB/SmolVLM2-HighlightGenerator"}],summary:"Video-text-to-text models take in a video and a text prompt and output text. These models are also called video-language models.",widgetModels:[""],youtubeId:""}),C("video-to-video",{datasets:[{description:"Dataset with detailed annotations for training and benchmarking video instance editing.",id:"suimu/VIRESET"},{description:"Dataset to evaluate models on long video generation and understanding.",id:"zhangsh2001/LongV-EVAL"},{description:"Collection of 104 demo videos from the SeedVR/SeedVR2 series showcasing model outputs.",id:"Iceclear/SeedVR_VideoDemos"}],demo:{inputs:[{filename:"input.gif",type:"img"}],outputs:[{filename:"output.gif",type:"img"}]},metrics:[],models:[{description:"Model for editing outfits, character, and scenery in videos.",id:"decart-ai/Lucy-Edit-Dev"},{description:"Framework that uses 3D mesh proxies for precise, consistent video editing.",id:"LeoLau/Shape-for-Motion"},{description:"Model for generating physics-aware videos from input videos and control conditions.",id:"nvidia/Cosmos-Transfer2.5-2B"},{description:"A model to upscale videos at input, designed for seamless use with ComfyUI.",id:"numz/SeedVR2_comfyUI"}],spaces:[{description:"Interactive demo space for Lucy-Edit-Dev video editing.",id:"decart-ai/lucy-edit-dev"},{description:"Demo space for SeedVR2-3B showcasing video upscaling and restoration.",id:"ByteDance-Seed/SeedVR2-3B"}],summary:"Video-to-video models take one or more videos as input and generate new videos as output. They can enhance quality, interpolate frames, modify styles, or create new motion dynamics, enabling creative applications, video production, and research.",widgetModels:[],youtubeId:""}),C("visual-question-answering",y),C("zero-shot-classification",_),C("zero-shot-image-classification",A),C("zero-shot-object-detection",{datasets:[],demo:{inputs:[{filename:"zero-shot-object-detection-input.jpg",type:"img"},{label:"Classes",content:"cat, dog, bird",type:"text"}],outputs:[{filename:"zero-shot-object-detection-output.jpg",type:"img"}]},metrics:[{description:"The Average Precision (AP) metric is the Area Under the PR Curve (AUC-PR). It is calculated for each class separately",id:"Average Precision"},{description:"The Mean Average Precision (mAP) metric is the overall average of the AP values",id:"Mean Average Precision"},{description:"The APα metric is the Average Precision at the IoU threshold of a α value, for example, AP50 and AP75",id:"APα"}],models:[{description:"Solid zero-shot object detection model.",id:"openmmlab-community/mm_grounding_dino_large_all"},{description:"Cutting-edge zero-shot object detection model.",id:"fushh7/LLMDet"}],spaces:[{description:"A demo to compare different zero-shot object detection models per output and latency.",id:"ariG23498/zero-shot-od"},{description:"A demo that combines a zero-shot object detection and mask generation model for zero-shot segmentation.",id:"merve/OWLSAM"}],summary:"Zero-shot object detection is a computer vision task to detect objects and their classes in images, without any prior training or knowledge of the classes. Zero-shot object detection models receive an image as input, as well as a list of candidate classes, and output the bounding boxes and labels where the objects have been detected.",widgetModels:[],youtubeId:""}),C("text-to-3d",{datasets:[{description:"A large dataset of over 10 million 3D objects.",id:"allenai/objaverse-xl"},{description:"Descriptive captions for 3D objects in Objaverse.",id:"tiange/Cap3D"}],demo:{inputs:[{label:"Prompt",content:"a cat statue",type:"text"}],outputs:[{label:"Result",content:"text-to-3d-3d-output-filename.glb",type:"text"}]},metrics:[],models:[{description:"Text-to-3D mesh model by OpenAI",id:"openai/shap-e"},{description:"Generative 3D gaussian splatting model.",id:"ashawkey/LGM"}],spaces:[{description:"Text-to-3D demo with mesh outputs.",id:"hysts/Shap-E"},{description:"Text/image-to-3D demo with splat outputs.",id:"ashawkey/LGM"}],summary:"Text-to-3D models take in text input and produce 3D output.",widgetModels:[],youtubeId:""}),C("image-to-3d",{datasets:[{description:"A large dataset of over 10 million 3D objects.",id:"allenai/objaverse-xl"},{description:"A dataset of isolated object images for evaluating image-to-3D models.",id:"dylanebert/iso3d"}],demo:{inputs:[{filename:"image-to-3d-image-input.png",type:"img"}],outputs:[{label:"Result",content:"image-to-3d-3d-output-filename.glb",type:"text"}]},metrics:[],models:[{description:"Fast image-to-3D mesh model by Tencent.",id:"TencentARC/InstantMesh"},{description:"3D world generation model.",id:"tencent/HunyuanWorld-1"},{description:"A scaled up image-to-3D mesh model derived from TripoSR.",id:"hwjiang/Real3D"},{description:"Consistent image-to-3d generation model.",id:"stabilityai/stable-point-aware-3d"}],spaces:[{description:"Leaderboard to evaluate image-to-3D models.",id:"dylanebert/3d-arena"},{description:"Image-to-3D demo with mesh outputs.",id:"TencentARC/InstantMesh"},{description:"Image-to-3D demo.",id:"stabilityai/stable-point-aware-3d"},{description:"Image-to-3D demo with mesh outputs.",id:"hwjiang/Real3D"},{description:"Image-to-3D demo with splat outputs.",id:"dylanebert/LGM-mini"}],summary:"Image-to-3D models take in image input and produce 3D output.",widgetModels:[],youtubeId:""});let w=["audio-classification","automatic-speech-recognition","depth-estimation","document-question-answering","feature-extraction","fill-mask","image-classification","image-feature-extraction","image-segmentation","image-to-image","image-to-text","image-text-to-text","mask-generation","object-detection","question-answering","summarization","table-question-answering","text-classification","text-generation","text-to-audio","text-to-speech","token-classification","translation","video-classification","visual-question-answering","zero-shot-classification","zero-shot-image-classification","zero-shot-object-detection"],F=e=>e.tags.includes("conversational")?"text-generation"===e.pipeline_tag?[{role:"user",content:"What is the capital of France?"}]:[{role:"user",content:[{type:"text",text:"Describe this image in one sentence."},{type:"image_url",image_url:{url:"https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg"}}]}]:'"Can you please let us know more details about your "',x=()=>'\'{"Height":[11.52,12.48],"Length1":[23.2,24.0],"Length2":[25.4,26.3],"Species": ["Bream","Bream"]}\'',E={"audio-to-audio":()=>'"sample1.flac"',"audio-classification":()=>'"sample1.flac"',"automatic-speech-recognition":()=>'"sample1.flac"',"document-question-answering":()=>`{
2
+ "image": "cat.png",
3
+ "question": "What is in this image?"
4
+ }`,"feature-extraction":()=>'"Today is a sunny day and I will get some ice cream."',"fill-mask":e=>`"The answer to the universe is ${e.mask_token}."`,"image-classification":()=>'"cats.jpg"',"image-to-text":()=>'"cats.jpg"',"image-to-image":()=>`{
5
+ "image": "cat.png",
6
+ "prompt": "Turn the cat into a tiger."
7
+ }`,"image-to-video":()=>`{
8
+ "image": "cat.png",
9
+ "prompt": "The cat starts to dance"
10
+ }`,"image-text-to-image":()=>`{
11
+ "image": "cat.png",
12
+ "prompt": "Turn the cat into a tiger."
13
+ }`,"image-text-to-video":()=>`{
14
+ "image": "cat.png",
15
+ "prompt": "The cat starts to dance"
16
+ }`,"image-segmentation":()=>'"cats.jpg"',"object-detection":()=>'"cats.jpg"',"question-answering":()=>`{
17
+ "question": "What is my name?",
18
+ "context": "My name is Clara and I live in Berkeley."
19
+ }`,"sentence-similarity":()=>`{
20
+ "source_sentence": "That is a happy person",
21
+ "sentences": [
22
+ "That is a happy dog",
23
+ "That is a very happy person",
24
+ "Today is a sunny day"
25
+ ]
26
+ }`,summarization:()=>'"The tower is 324 metres (1,063 ft) tall, about the same height as an 81-storey building, and the tallest structure in Paris. Its base is square, measuring 125 metres (410 ft) on each side. During its construction, the Eiffel Tower surpassed the Washington Monument to become the tallest man-made structure in the world, a title it held for 41 years until the Chrysler Building in New York City was finished in 1930. It was the first structure to reach a height of 300 metres. Due to the addition of a broadcasting aerial at the top of the tower in 1957, it is now taller than the Chrysler Building by 5.2 metres (17 ft). Excluding transmitters, the Eiffel Tower is the second tallest free-standing structure in France after the Millau Viaduct."',"table-question-answering":()=>`{
27
+ "query": "How many stars does the transformers repository have?",
28
+ "table": {
29
+ "Repository": ["Transformers", "Datasets", "Tokenizers"],
30
+ "Stars": ["36542", "4512", "3934"],
31
+ "Contributors": ["651", "77", "34"],
32
+ "Programming language": [
33
+ "Python",
34
+ "Python",
35
+ "Rust, Python and NodeJS"
36
+ ]
37
+ }
38
+ }`,"tabular-regression":x,"tabular-classification":x,"text-classification":()=>'"I like you. I love you"',"text-generation":F,"image-text-to-text":F,"text-to-image":()=>'"Astronaut riding a horse"',"text-to-video":()=>'"A young man walking on the street"',"text-to-speech":()=>'"The answer to the universe is 42"',"text-to-audio":()=>'"liquid drum and bass, atmospheric synths, airy sounds"',"token-classification":()=>'"My name is Sarah Jessica Parker but you can call me Jessica"',translation:()=>'"Меня зовут Вольфганг и я живу в Берлине"',"zero-shot-classification":()=>'"Hi, I recently bought a device from your company but it is not working as advertised and I would like to get reimbursed!"',"zero-shot-image-classification":()=>'"cats.jpg"'},k="custom_code";function B(e){let t=e.split("/");return 1===t.length?t[0]:t[1]}function I(e){return e.cardData?.base_model?.toString()??"fill-in-base-model"}function S(e){let t=e.widgetData?.[0]?.text??e.cardData?.instance_prompt;if(t)return JSON.stringify(t).slice(1,-1)}let T="Astronaut in a jungle, cold color palette, muted colors, detailed, 8k",M="Turn this cat into a dog",L="A man with short gray hair plays a red electric guitar.",N=e=>{let t;if(e.tags.includes("StableDiffusionInpaintPipeline")||e.tags.includes("StableDiffusionXLInpaintPipeline"))t=[`import torch
39
+ from diffusers import AutoPipelineForInpainting
40
+ from diffusers.utils import load_image
41
+
42
+ # switch to "mps" for apple devices
43
+ pipe = AutoPipelineForInpainting.from_pretrained("${e.id}", dtype=torch.float16, variant="fp16", device_map="cuda")
44
+
45
+ img_url = "https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo.png"
46
+ mask_url = "https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo_mask.png"
47
+
48
+ image = load_image(img_url).resize((1024, 1024))
49
+ mask_image = load_image(mask_url).resize((1024, 1024))
50
+
51
+ prompt = "a tiger sitting on a park bench"
52
+ generator = torch.Generator(device="cuda").manual_seed(0)
53
+
54
+ image = pipe(
55
+ prompt=prompt,
56
+ image=image,
57
+ mask_image=mask_image,
58
+ guidance_scale=8.0,
59
+ num_inference_steps=20, # steps between 15 and 30 work well for us
60
+ strength=0.99, # make sure to use \`strength\` below 1.0
61
+ generator=generator,
62
+ ).images[0]`];else if(e.tags.includes("controlnet"))t=[`from diffusers import ControlNetModel, StableDiffusionControlNetPipeline
63
+
64
+ controlnet = ControlNetModel.from_pretrained("${e.id}")
65
+ pipe = StableDiffusionControlNetPipeline.from_pretrained(
66
+ "${I(e)}", controlnet=controlnet
67
+ )`];else if(e.tags.includes("lora"))if("image-to-image"===e.pipeline_tag)t=[`import torch
68
+ from diffusers import DiffusionPipeline
69
+ from diffusers.utils import load_image
70
+
71
+ # switch to "mps" for apple devices
72
+ pipe = DiffusionPipeline.from_pretrained("${I(e)}", dtype=torch.bfloat16, device_map="cuda")
73
+ pipe.load_lora_weights("${e.id}")
74
+
75
+ prompt = "${S(e)??M}"
76
+ input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png")
77
+
78
+ image = pipe(image=input_image, prompt=prompt).images[0]`];else if("image-to-video"===e.pipeline_tag)t=[`import torch
79
+ from diffusers import DiffusionPipeline
80
+ from diffusers.utils import load_image, export_to_video
81
+
82
+ # switch to "mps" for apple devices
83
+ pipe = DiffusionPipeline.from_pretrained("${I(e)}", dtype=torch.bfloat16, device_map="cuda")
84
+ pipe.load_lora_weights("${e.id}")
85
+
86
+ prompt = "${S(e)??L}"
87
+ input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/guitar-man.png")
88
+
89
+ image = pipe(image=input_image, prompt=prompt).frames[0]
90
+ export_to_video(output, "output.mp4")`];else if("text-to-video"===e.pipeline_tag)t=[`import torch
91
+ from diffusers import DiffusionPipeline
92
+ from diffusers.utils import export_to_video
93
+
94
+ # switch to "mps" for apple devices
95
+ pipe = DiffusionPipeline.from_pretrained("${I(e)}", dtype=torch.bfloat16, device_map="cuda")
96
+ pipe.load_lora_weights("${e.id}")
97
+
98
+ prompt = "${S(e)??L}"
99
+
100
+ output = pipe(prompt=prompt).frames[0]
101
+ export_to_video(output, "output.mp4")`];else t=[`import torch
102
+ from diffusers import DiffusionPipeline
103
+
104
+ # switch to "mps" for apple devices
105
+ pipe = DiffusionPipeline.from_pretrained("${I(e)}", dtype=torch.bfloat16, device_map="cuda")
106
+ pipe.load_lora_weights("${e.id}")
107
+
108
+ prompt = "${S(e)??T}"
109
+ image = pipe(prompt).images[0]`];else if(e.tags.includes("textual_inversion"))t=[`import torch
110
+ from diffusers import DiffusionPipeline
111
+
112
+ # switch to "mps" for apple devices
113
+ pipe = DiffusionPipeline.from_pretrained("${I(e)}", dtype=torch.bfloat16, device_map="cuda")
114
+ pipe.load_textual_inversion("${e.id}")`];else if(e.tags.includes("FluxFillPipeline"))t=[`import torch
115
+ from diffusers import FluxFillPipeline
116
+ from diffusers.utils import load_image
117
+
118
+ image = load_image("https://huggingface.co/datasets/diffusers/diffusers-images-docs/resolve/main/cup.png")
119
+ mask = load_image("https://huggingface.co/datasets/diffusers/diffusers-images-docs/resolve/main/cup_mask.png")
120
+
121
+ # switch to "mps" for apple devices
122
+ pipe = FluxFillPipeline.from_pretrained("${e.id}", dtype=torch.bfloat16, device_map="cuda")
123
+ image = pipe(
124
+ prompt="a white paper cup",
125
+ image=image,
126
+ mask_image=mask,
127
+ height=1632,
128
+ width=1232,
129
+ guidance_scale=30,
130
+ num_inference_steps=50,
131
+ max_sequence_length=512,
132
+ generator=torch.Generator("cpu").manual_seed(0)
133
+ ).images[0]
134
+ image.save(f"flux-fill-dev.png")`];else if("image-to-video"===e.pipeline_tag)t=[`import torch
135
+ from diffusers import DiffusionPipeline
136
+ from diffusers.utils import load_image, export_to_video
137
+
138
+ # switch to "mps" for apple devices
139
+ pipe = DiffusionPipeline.from_pretrained("${e.id}", dtype=torch.bfloat16, device_map="cuda")
140
+ pipe.to("cuda")
141
+
142
+ prompt = "${S(e)??L}"
143
+ image = load_image(
144
+ "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/guitar-man.png"
145
+ )
146
+
147
+ output = pipe(image=image, prompt=prompt).frames[0]
148
+ export_to_video(output, "output.mp4")`];else if("image-to-image"===e.pipeline_tag)t=[`import torch
149
+ from diffusers import DiffusionPipeline
150
+ from diffusers.utils import load_image
151
+
152
+ # switch to "mps" for apple devices
153
+ pipe = DiffusionPipeline.from_pretrained("${e.id}", dtype=torch.bfloat16, device_map="cuda")
154
+
155
+ prompt = "${S(e)??M}"
156
+ input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png")
157
+
158
+ image = pipe(image=input_image, prompt=prompt).images[0]`];else t=[`import torch
159
+ from diffusers import DiffusionPipeline
160
+
161
+ # switch to "mps" for apple devices
162
+ pipe = DiffusionPipeline.from_pretrained("${e.id}", dtype=torch.bfloat16, device_map="cuda")
163
+
164
+ prompt = "${S(e)??T}"
165
+ image = pipe(prompt).images[0]`];return["pip install -U diffusers transformers accelerate",...t]},P={CausalLM:e=>`
166
+ import keras_hub
167
+
168
+ # Load CausalLM model (optional: use half precision for inference)
169
+ causal_lm = keras_hub.models.CausalLM.from_preset("hf://${e}", dtype="bfloat16")
170
+ causal_lm.compile(sampler="greedy") # (optional) specify a sampler
171
+
172
+ # Generate text
173
+ causal_lm.generate("Keras: deep learning for", max_length=64)
174
+ `,TextToImage:e=>`
175
+ import keras_hub
176
+
177
+ # Load TextToImage model (optional: use half precision for inference)
178
+ text_to_image = keras_hub.models.TextToImage.from_preset("hf://${e}", dtype="bfloat16")
179
+
180
+ # Generate images with a TextToImage model.
181
+ text_to_image.generate("Astronaut in a jungle")
182
+ `,TextClassifier:e=>`
183
+ import keras_hub
184
+
185
+ # Load TextClassifier model
186
+ text_classifier = keras_hub.models.TextClassifier.from_preset(
187
+ "hf://${e}",
188
+ num_classes=2,
189
+ )
190
+ # Fine-tune
191
+ text_classifier.fit(x=["Thilling adventure!", "Total snoozefest."], y=[1, 0])
192
+ # Classify text
193
+ text_classifier.predict(["Not my cup of tea."])
194
+ `,ImageClassifier:e=>`
195
+ import keras_hub
196
+ import keras
197
+
198
+ # Load ImageClassifier model
199
+ image_classifier = keras_hub.models.ImageClassifier.from_preset(
200
+ "hf://${e}",
201
+ num_classes=2,
202
+ )
203
+ # Fine-tune
204
+ image_classifier.fit(
205
+ x=keras.random.randint((32, 64, 64, 3), 0, 256),
206
+ y=keras.random.randint((32, 1), 0, 2),
207
+ )
208
+ # Classify image
209
+ image_classifier.predict(keras.random.randint((1, 64, 64, 3), 0, 256))
210
+ `},R=(e,t)=>`
211
+ import keras_hub
212
+
213
+ # Create a ${e} model
214
+ task = keras_hub.models.${e}.from_preset("hf://${t}")
215
+ `,U=e=>{let t=e.transformersInfo;if(!t)return["# ⚠️ Type of model unknown"];let i=e.tags.includes(k)?", trust_remote_code=True":"",o=[];if(t.processor){let a="AutoTokenizer"===t.processor?"tokenizer":"AutoFeatureExtractor"===t.processor?"extractor":"processor";o.push("# Load model directly",`from transformers import ${t.processor}, ${t.auto_model}`,"",`${a} = ${t.processor}.from_pretrained("${e.id}"`+i+")",`model = ${t.auto_model}.from_pretrained("${e.id}"`+i+")"),e.tags.includes("conversational")&&(e.config?.tokenizer_config?.chat_template!==void 0||e.config?.processor_config?.chat_template!==void 0||e.config?.chat_template_jinja!==void 0)&&(e.tags.includes("image-text-to-text")?o.push("messages = [",' {\n "role": "user",\n "content": [\n {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},\n {"type": "text", "text": "What animal is on the candy?"}\n ]\n },',"]"):o.push("messages = [",' {"role": "user", "content": "Who are you?"},',"]"),o.push(`inputs = ${a}.apply_chat_template(`," messages,"," add_generation_prompt=True,"," tokenize=True,"," return_dict=True,",' return_tensors="pt",',").to(model.device)","","outputs = model.generate(**inputs, max_new_tokens=40)",`print(${a}.decode(outputs[0][inputs["input_ids"].shape[-1]:]))`))}else o.push("# Load model directly",`from transformers import ${t.auto_model}`,`model = ${t.auto_model}.from_pretrained("${e.id}"`+i+', dtype="auto")');if(e.pipeline_tag&&w?.includes(e.pipeline_tag)){let t=["# Use a pipeline as a high-level helper","from transformers import pipeline","",`pipe = pipeline("${e.pipeline_tag}", model="${e.id}"`+i+")"];return e.tags.includes("conversational")?e.tags.includes("image-text-to-text")?(t.push("messages = [",' {\n "role": "user",\n "content": [\n {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},\n {"type": "text", "text": "What animal is on the candy?"}\n ]\n },',"]"),t.push("pipe(text=messages)")):(t.push("messages = [",' {"role": "user", "content": "Who are you?"},',"]"),t.push("pipe(messages)")):"zero-shot-image-classification"===e.pipeline_tag?t.push("pipe(",' "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png",',' candidate_labels=["animals", "humans", "landscape"],',")"):"image-classification"===e.pipeline_tag&&t.push('pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")'),[t.join("\n"),o.join("\n")]}return[o.join("\n")]},$=e=>{let t=e.tags.find(e=>e.match(/^yolov\d+$/)),i=t?`YOLOv${t.slice(4)}`:"YOLOvXX";return[(t?"":`# Couldn't find a valid YOLO version tag.
216
+ # Replace XX with the correct version.
217
+ `)+`from ultralytics import ${i}
218
+
219
+ model = ${i}.from_pretrained("${e.id}")
220
+ source = 'http://images.cocodataset.org/val2017/000000039769.jpg'
221
+ model.predict(source=source, save=True)`]},Q={acestep:{prettyLabel:"ACE-Step",repoName:"ACE-Step",repoUrl:"https://github.com/ace-step/ACE-Step",filter:!1,countDownloads:'path:"ace_step_transformer/config.json"'},"adapter-transformers":{prettyLabel:"Adapters",repoName:"adapters",repoUrl:"https://github.com/Adapter-Hub/adapters",docsUrl:"https://huggingface.co/docs/hub/adapters",snippets:e=>[`from adapters import AutoAdapterModel
222
+
223
+ model = AutoAdapterModel.from_pretrained("${e.config?.adapter_transformers?.model_name}")
224
+ model.load_adapter("${e.id}", set_active=True)`],filter:!0,countDownloads:'path:"adapter_config.json"'},allennlp:{prettyLabel:"AllenNLP",repoName:"AllenNLP",repoUrl:"https://github.com/allenai/allennlp",docsUrl:"https://huggingface.co/docs/hub/allennlp",snippets:e=>{if(e.tags.includes("question-answering"))return[`import allennlp_models
225
+ from allennlp.predictors.predictor import Predictor
226
+
227
+ predictor = Predictor.from_path("hf://${e.id}")
228
+ predictor_input = {"passage": "My name is Wolfgang and I live in Berlin", "question": "Where do I live?"}
229
+ predictions = predictor.predict_json(predictor_input)`];return[`import allennlp_models
230
+ from allennlp.predictors.predictor import Predictor
231
+
232
+ predictor = Predictor.from_path("hf://${e.id}")`]},filter:!0},anemoi:{prettyLabel:"AnemoI",repoName:"AnemoI",repoUrl:"https://github.com/ecmwf/anemoi-inference",docsUrl:"https://anemoi.readthedocs.io/en/latest/",filter:!1,countDownloads:'path_extension:"ckpt"',snippets:e=>[`from anemoi.inference.runners.default import DefaultRunner
233
+ from anemoi.inference.config.run import RunConfiguration
234
+ # Create Configuration
235
+ config = RunConfiguration(checkpoint = {"huggingface":"${e.id}"})
236
+ # Load Runner
237
+ runner = DefaultRunner(config)`]},araclip:{prettyLabel:"AraClip",repoName:"AraClip",repoUrl:"https://huggingface.co/Arabic-Clip/araclip",filter:!1,snippets:e=>[`from araclip import AraClip
238
+
239
+ model = AraClip.from_pretrained("${e.id}")`]},asteroid:{prettyLabel:"Asteroid",repoName:"Asteroid",repoUrl:"https://github.com/asteroid-team/asteroid",docsUrl:"https://huggingface.co/docs/hub/asteroid",snippets:e=>[`from asteroid.models import BaseModel
240
+
241
+ model = BaseModel.from_pretrained("${e.id}")`],filter:!0,countDownloads:'path:"pytorch_model.bin"'},audiocraft:{prettyLabel:"Audiocraft",repoName:"audiocraft",repoUrl:"https://github.com/facebookresearch/audiocraft",snippets:e=>{if(e.tags.includes("musicgen"))return[`from audiocraft.models import MusicGen
242
+
243
+ model = MusicGen.get_pretrained("${e.id}")
244
+
245
+ descriptions = ['happy rock', 'energetic EDM', 'sad jazz']
246
+ wav = model.generate(descriptions) # generates 3 samples.`];if(e.tags.includes("audiogen"))return[`from audiocraft.models import AudioGen
247
+
248
+ model = AudioGen.get_pretrained("${e.id}")
249
+ model.set_generation_params(duration=5) # generate 5 seconds.
250
+ descriptions = ['dog barking', 'sirene of an emergency vehicle', 'footsteps in a corridor']
251
+ wav = model.generate(descriptions) # generates 3 samples.`];if(!e.tags.includes("magnet"))return["# Type of model unknown."];return[`from audiocraft.models import MAGNeT
252
+
253
+ model = MAGNeT.get_pretrained("${e.id}")
254
+
255
+ descriptions = ['disco beat', 'energetic EDM', 'funky groove']
256
+ wav = model.generate(descriptions) # generates 3 samples.`]},filter:!1,countDownloads:'path:"state_dict.bin"'},audioseal:{prettyLabel:"AudioSeal",repoName:"audioseal",repoUrl:"https://github.com/facebookresearch/audioseal",filter:!1,countDownloads:'path_extension:"pth"',snippets:e=>[`# Watermark Generator
257
+ from audioseal import AudioSeal
258
+
259
+ model = AudioSeal.load_generator("${e.id}")
260
+ # pass a tensor (tensor_wav) of shape (batch, channels, samples) and a sample rate
261
+ wav, sr = tensor_wav, 16000
262
+
263
+ watermark = model.get_watermark(wav, sr)
264
+ watermarked_audio = wav + watermark`,`# Watermark Detector
265
+ from audioseal import AudioSeal
266
+
267
+ detector = AudioSeal.load_detector("${e.id}")
268
+
269
+ result, message = detector.detect_watermark(watermarked_audio, sr)`]},"bagel-mot":{prettyLabel:"Bagel",repoName:"Bagel",repoUrl:"https://github.com/ByteDance-Seed/Bagel/",filter:!1,countDownloads:'path:"llm_config.json"'},bboxmaskpose:{prettyLabel:"BBoxMaskPose",repoName:"BBoxMaskPose",repoUrl:"https://github.com/MiraPurkrabek/BBoxMaskPose",filter:!1,countDownloads:'path_extension:"pth"'},ben2:{prettyLabel:"BEN2",repoName:"BEN2",repoUrl:"https://github.com/PramaLLC/BEN2",snippets:e=>[`import requests
270
+ from PIL import Image
271
+ from ben2 import AutoModel
272
+
273
+ url = "https://huggingface.co/datasets/mishig/sample_images/resolve/main/teapot.jpg"
274
+ image = Image.open(requests.get(url, stream=True).raw)
275
+
276
+ model = AutoModel.from_pretrained("${e.id}")
277
+ model.to("cuda").eval()
278
+ foreground = model.inference(image)
279
+ `],filter:!1},bertopic:{prettyLabel:"BERTopic",repoName:"BERTopic",repoUrl:"https://github.com/MaartenGr/BERTopic",snippets:e=>[`from bertopic import BERTopic
280
+
281
+ model = BERTopic.load("${e.id}")`],filter:!0},big_vision:{prettyLabel:"Big Vision",repoName:"big_vision",repoUrl:"https://github.com/google-research/big_vision",filter:!1,countDownloads:'path_extension:"npz"'},birder:{prettyLabel:"Birder",repoName:"Birder",repoUrl:"https://gitlab.com/birder/birder",filter:!1,countDownloads:'path_extension:"pt"'},birefnet:{prettyLabel:"BiRefNet",repoName:"BiRefNet",repoUrl:"https://github.com/ZhengPeng7/BiRefNet",snippets:e=>[`# Option 1: use with transformers
282
+
283
+ from transformers import AutoModelForImageSegmentation
284
+ birefnet = AutoModelForImageSegmentation.from_pretrained("${e.id}", trust_remote_code=True)
285
+ `,`# Option 2: use with BiRefNet
286
+
287
+ # Install from https://github.com/ZhengPeng7/BiRefNet
288
+
289
+ from models.birefnet import BiRefNet
290
+ model = BiRefNet.from_pretrained("${e.id}")`],filter:!1},bm25s:{prettyLabel:"BM25S",repoName:"bm25s",repoUrl:"https://github.com/xhluca/bm25s",snippets:e=>[`from bm25s.hf import BM25HF
291
+
292
+ retriever = BM25HF.load_from_hub("${e.id}")`],filter:!1,countDownloads:'path:"params.index.json"'},boltzgen:{prettyLabel:"BoltzGen",repoName:"BoltzGen",repoUrl:"https://github.com/HannesStark/boltzgen",filter:!1,countDownloads:'path:"boltzgen1_diverse.ckpt"'},cancertathomev2:{prettyLabel:"Cancer@HomeV2",repoName:"Cancer@HomeV2",repoUrl:"https://huggingface.co/OpenPeerAI/CancerAtHomeV2",filter:!1,countDownloads:'path:"run.py"'},cartesia_pytorch:{prettyLabel:"Cartesia Pytorch",repoName:"Cartesia Pytorch",repoUrl:"https://github.com/cartesia-ai/cartesia_pytorch",snippets:e=>[`# pip install --no-binary :all: cartesia-pytorch
293
+ from cartesia_pytorch import ReneLMHeadModel
294
+ from transformers import AutoTokenizer
295
+
296
+ model = ReneLMHeadModel.from_pretrained("${e.id}")
297
+ tokenizer = AutoTokenizer.from_pretrained("allenai/OLMo-1B-hf")
298
+
299
+ in_message = ["Rene Descartes was"]
300
+ inputs = tokenizer(in_message, return_tensors="pt")
301
+
302
+ outputs = model.generate(inputs.input_ids, max_length=50, top_k=100, top_p=0.99)
303
+ out_message = tokenizer.batch_decode(outputs, skip_special_tokens=True)[0]
304
+
305
+ print(out_message)
306
+ )`]},cartesia_mlx:{prettyLabel:"Cartesia MLX",repoName:"Cartesia MLX",repoUrl:"https://github.com/cartesia-ai/cartesia_mlx",snippets:e=>[`import mlx.core as mx
307
+ import cartesia_mlx as cmx
308
+
309
+ model = cmx.from_pretrained("${e.id}")
310
+ model.set_dtype(mx.float32)
311
+
312
+ prompt = "Rene Descartes was"
313
+
314
+ for text in model.generate(
315
+ prompt,
316
+ max_tokens=500,
317
+ eval_every_n=5,
318
+ verbose=True,
319
+ top_p=0.99,
320
+ temperature=0.85,
321
+ ):
322
+ print(text, end="", flush=True)
323
+ `]},champ:{prettyLabel:"Champ",repoName:"Champ",repoUrl:"https://github.com/fudan-generative-vision/champ",countDownloads:'path:"champ/motion_module.pth"'},chatterbox:{prettyLabel:"Chatterbox",repoName:"Chatterbox",repoUrl:"https://github.com/resemble-ai/chatterbox",snippets:()=>[`# pip install chatterbox-tts
324
+ import torchaudio as ta
325
+ from chatterbox.tts import ChatterboxTTS
326
+
327
+ model = ChatterboxTTS.from_pretrained(device="cuda")
328
+
329
+ text = "Ezreal and Jinx teamed up with Ahri, Yasuo, and Teemo to take down the enemy's Nexus in an epic late-game pentakill."
330
+ wav = model.generate(text)
331
+ ta.save("test-1.wav", wav, model.sr)
332
+
333
+ # If you want to synthesize with a different voice, specify the audio prompt
334
+ AUDIO_PROMPT_PATH="YOUR_FILE.wav"
335
+ wav = model.generate(text, audio_prompt_path=AUDIO_PROMPT_PATH)
336
+ ta.save("test-2.wav", wav, model.sr)`],countDownloads:'path:"tokenizer.json"',filter:!1},chaossim:{prettyLabel:"ChaosSIM",repoName:"ChaosSIM",repoUrl:"https://huggingface.co/OpenPeerAI/ChaosSIM/",countDownloads:'path:"ChaosSim.nb"',filter:!1},chat_tts:{prettyLabel:"ChatTTS",repoName:"ChatTTS",repoUrl:"https://github.com/2noise/ChatTTS.git",snippets:()=>[`import ChatTTS
337
+ import torchaudio
338
+
339
+ chat = ChatTTS.Chat()
340
+ chat.load_models(compile=False) # Set to True for better performance
341
+
342
+ texts = ["PUT YOUR TEXT HERE",]
343
+
344
+ wavs = chat.infer(texts, )
345
+
346
+ torchaudio.save("output1.wav", torch.from_numpy(wavs[0]), 24000)`],filter:!1,countDownloads:'path:"asset/GPT.pt"'},"chronos-forecasting":{prettyLabel:"Chronos",repoName:"Chronos",repoUrl:"https://github.com/amazon-science/chronos-forecasting",snippets:e=>["pip install chronos-forecasting",`import pandas as pd
347
+ from chronos import BaseChronosPipeline
348
+
349
+ pipeline = BaseChronosPipeline.from_pretrained("${e.id}", device_map="cuda")
350
+
351
+ # Load historical data
352
+ context_df = pd.read_csv("https://autogluon.s3.us-west-2.amazonaws.com/datasets/timeseries/misc/AirPassengers.csv")
353
+
354
+ # Generate predictions
355
+ pred_df = pipeline.predict_df(
356
+ context_df,
357
+ prediction_length=36, # Number of steps to forecast
358
+ quantile_levels=[0.1, 0.5, 0.9], # Quantiles for probabilistic forecast
359
+ id_column="item_id", # Column identifying different time series
360
+ timestamp_column="Month", # Column with datetime information
361
+ target="#Passengers", # Column(s) with time series values to predict
362
+ )`]},clara:{prettyLabel:"Clara",repoName:"Clara",filter:!1,repoUrl:"https://github.com/nvidia/clara",countDownloads:'path_extension:"ckpt" OR path:"config.json"'},clipscope:{prettyLabel:"clipscope",repoName:"clipscope",repoUrl:"https://github.com/Lewington-pitsos/clipscope",filter:!1,countDownloads:'path_extension:"pt"'},"cloud-agents":{prettyLabel:"Cloud Agents",repoName:"Cloud Agents",repoUrl:"https://huggingface.co/OpenPeerAI/Cloud-Agents",filter:!1,countDownloads:'path:"setup.py"'},cosyvoice:{prettyLabel:"CosyVoice",repoName:"CosyVoice",repoUrl:"https://github.com/FunAudioLLM/CosyVoice",filter:!1,countDownloads:'path_extension:"onnx" OR path_extension:"pt"'},cotracker:{prettyLabel:"CoTracker",repoName:"CoTracker",repoUrl:"https://github.com/facebookresearch/co-tracker",filter:!1,countDownloads:'path_extension:"pth"'},colpali:{prettyLabel:"ColPali",repoName:"ColPali",repoUrl:"https://github.com/ManuelFay/colpali",filter:!1,countDownloads:'path:"adapter_config.json"'},comet:{prettyLabel:"COMET",repoName:"COMET",repoUrl:"https://github.com/Unbabel/COMET/",countDownloads:'path:"hparams.yaml"'},cosmos:{prettyLabel:"Cosmos",repoName:"Cosmos",repoUrl:"https://github.com/NVIDIA/Cosmos",countDownloads:'path:"config.json" OR path_extension:"pt"'},"cxr-foundation":{prettyLabel:"CXR Foundation",repoName:"cxr-foundation",repoUrl:"https://github.com/google-health/cxr-foundation",snippets:()=>[`# pip install git+https://github.com/Google-Health/cxr-foundation.git#subdirectory=python
363
+
364
+ # Load image as grayscale (Stillwaterising, CC0, via Wikimedia Commons)
365
+ import requests
366
+ from PIL import Image
367
+ from io import BytesIO
368
+ image_url = "https://upload.wikimedia.org/wikipedia/commons/c/c8/Chest_Xray_PA_3-8-2010.png"
369
+ img = Image.open(requests.get(image_url, headers={'User-Agent': 'Demo'}, stream=True).raw).convert('L')
370
+
371
+ # Run inference
372
+ from clientside.clients import make_hugging_face_client
373
+ cxr_client = make_hugging_face_client('cxr_model')
374
+ print(cxr_client.get_image_embeddings_from_images([img]))`],filter:!1,countDownloads:'path:"precomputed_embeddings/embeddings.npz" OR path:"pax-elixr-b-text/saved_model.pb"'},deepforest:{prettyLabel:"DeepForest",repoName:"deepforest",docsUrl:"https://deepforest.readthedocs.io/en/latest/",repoUrl:"https://github.com/weecology/DeepForest"},"depth-anything-v2":{prettyLabel:"DepthAnythingV2",repoName:"Depth Anything V2",repoUrl:"https://github.com/DepthAnything/Depth-Anything-V2",snippets:e=>{let t,i,o;return t="<ENCODER>",i="<NUMBER_OF_FEATURES>",o="<OUT_CHANNELS>","depth-anything/Depth-Anything-V2-Small"===e.id?(t="vits",i="64",o="[48, 96, 192, 384]"):"depth-anything/Depth-Anything-V2-Base"===e.id?(t="vitb",i="128",o="[96, 192, 384, 768]"):"depth-anything/Depth-Anything-V2-Large"===e.id&&(t="vitl",i="256",o="[256, 512, 1024, 1024"),[`
375
+ # Install from https://github.com/DepthAnything/Depth-Anything-V2
376
+
377
+ # Load the model and infer depth from an image
378
+ import cv2
379
+ import torch
380
+
381
+ from depth_anything_v2.dpt import DepthAnythingV2
382
+
383
+ # instantiate the model
384
+ model = DepthAnythingV2(encoder="${t}", features=${i}, out_channels=${o})
385
+
386
+ # load the weights
387
+ filepath = hf_hub_download(repo_id="${e.id}", filename="depth_anything_v2_${t}.pth", repo_type="model")
388
+ state_dict = torch.load(filepath, map_location="cpu")
389
+ model.load_state_dict(state_dict).eval()
390
+
391
+ raw_img = cv2.imread("your/image/path")
392
+ depth = model.infer_image(raw_img) # HxW raw depth map in numpy
393
+ `]},filter:!1,countDownloads:'path_extension:"pth"'},"depth-pro":{prettyLabel:"Depth Pro",repoName:"Depth Pro",repoUrl:"https://github.com/apple/ml-depth-pro",countDownloads:'path_extension:"pt"',snippets:e=>[`# Download checkpoint
394
+ pip install huggingface-hub
395
+ huggingface-cli download --local-dir checkpoints ${e.id}`,`import depth_pro
396
+
397
+ # Load model and preprocessing transform
398
+ model, transform = depth_pro.create_model_and_transforms()
399
+ model.eval()
400
+
401
+ # Load and preprocess an image.
402
+ image, _, f_px = depth_pro.load_rgb("example.png")
403
+ image = transform(image)
404
+
405
+ # Run inference.
406
+ prediction = model.infer(image, f_px=f_px)
407
+
408
+ # Results: 1. Depth in meters
409
+ depth = prediction["depth"]
410
+ # Results: 2. Focal length in pixels
411
+ focallength_px = prediction["focallength_px"]`],filter:!1},"derm-foundation":{prettyLabel:"Derm Foundation",repoName:"derm-foundation",repoUrl:"https://github.com/google-health/derm-foundation",snippets:()=>[`from huggingface_hub import from_pretrained_keras
412
+ import tensorflow as tf, requests
413
+
414
+ # Load and format input
415
+ IMAGE_URL = "https://storage.googleapis.com/dx-scin-public-data/dataset/images/3445096909671059178.png"
416
+ input_tensor = tf.train.Example(
417
+ features=tf.train.Features(
418
+ feature={
419
+ "image/encoded": tf.train.Feature(
420
+ bytes_list=tf.train.BytesList(value=[requests.get(IMAGE_URL, stream=True).content])
421
+ )
422
+ }
423
+ )
424
+ ).SerializeToString()
425
+
426
+ # Load model and run inference
427
+ loaded_model = from_pretrained_keras("google/derm-foundation")
428
+ infer = loaded_model.signatures["serving_default"]
429
+ print(infer(inputs=tf.constant([input_tensor])))`],filter:!1,countDownloads:'path:"scin_dataset_precomputed_embeddings.npz" OR path:"saved_model.pb"'},"describe-anything":{prettyLabel:"Describe Anything",repoName:"Describe Anything",repoUrl:"https://github.com/NVlabs/describe-anything",snippets:e=>[`# pip install git+https://github.com/NVlabs/describe-anything
430
+ from huggingface_hub import snapshot_download
431
+ from dam import DescribeAnythingModel
432
+
433
+ snapshot_download(${e.id}, local_dir="checkpoints")
434
+
435
+ dam = DescribeAnythingModel(
436
+ model_path="checkpoints",
437
+ conv_mode="v1",
438
+ prompt_mode="focal_prompt",
439
+ )`],filter:!1},"dia-tts":{prettyLabel:"Dia",repoName:"Dia",repoUrl:"https://github.com/nari-labs/dia",snippets:e=>[`import soundfile as sf
440
+ from dia.model import Dia
441
+
442
+ model = Dia.from_pretrained("${e.id}")
443
+ text = "[S1] Dia is an open weights text to dialogue model. [S2] You get full control over scripts and voices. [S1] Wow. Amazing. (laughs) [S2] Try it now on Git hub or Hugging Face."
444
+ output = model.generate(text)
445
+
446
+ sf.write("simple.mp3", output, 44100)`],filter:!1},dia2:{prettyLabel:"Dia2",repoName:"Dia2",repoUrl:"https://github.com/nari-labs/dia2",snippets:e=>[`from dia2 import Dia2, GenerationConfig, SamplingConfig
447
+
448
+ dia = Dia2.from_repo("${e.id}", device="cuda", dtype="bfloat16")
449
+ config = GenerationConfig(
450
+ cfg_scale=2.0,
451
+ audio=SamplingConfig(temperature=0.8, top_k=50),
452
+ use_cuda_graph=True,
453
+ )
454
+ result = dia.generate("[S1] Hello Dia2!", config=config, output_wav="hello.wav", verbose=True)
455
+ `],filter:!1},"diff-interpretation-tuning":{prettyLabel:"Diff Interpretation Tuning",repoName:"Diff Interpretation Tuning",repoUrl:"https://github.com/Aviously/diff-interpretation-tuning",filter:!1,countDownloads:'path_extension:"pt"'},diffree:{prettyLabel:"Diffree",repoName:"Diffree",repoUrl:"https://github.com/OpenGVLab/Diffree",filter:!1,countDownloads:'path:"diffree-step=000010999.ckpt"'},diffusers:{prettyLabel:"Diffusers",repoName:"\uD83E\uDD17/diffusers",repoUrl:"https://github.com/huggingface/diffusers",docsUrl:"https://huggingface.co/docs/hub/diffusers",snippets:N,filter:!0},diffusionkit:{prettyLabel:"DiffusionKit",repoName:"DiffusionKit",repoUrl:"https://github.com/argmaxinc/DiffusionKit",snippets:e=>{let t=`# Pipeline for Stable Diffusion 3
456
+ from diffusionkit.mlx import DiffusionPipeline
457
+
458
+ pipeline = DiffusionPipeline(
459
+ shift=3.0,
460
+ use_t5=False,
461
+ model_version=${e.id},
462
+ low_memory_mode=True,
463
+ a16=True,
464
+ w16=True,
465
+ )`,i=`# Pipeline for Flux
466
+ from diffusionkit.mlx import FluxPipeline
467
+
468
+ pipeline = FluxPipeline(
469
+ shift=1.0,
470
+ model_version=${e.id},
471
+ low_memory_mode=True,
472
+ a16=True,
473
+ w16=True,
474
+ )`,o=`# Image Generation
475
+ HEIGHT = 512
476
+ WIDTH = 512
477
+ NUM_STEPS = ${e.tags.includes("flux")?4:50}
478
+ CFG_WEIGHT = ${5*!e.tags.includes("flux")}
479
+
480
+ image, _ = pipeline.generate_image(
481
+ "a photo of a cat",
482
+ cfg_weight=CFG_WEIGHT,
483
+ num_steps=NUM_STEPS,
484
+ latent_size=(HEIGHT // 8, WIDTH // 8),
485
+ )`;return[e.tags.includes("flux")?i:t,o]}},"docking-at-home":{prettyLabel:"Docking@Home",repoName:"Docking@Home",repoUrl:"https://huggingface.co/OpenPeerAI/DockingAtHOME",filter:!1,countDownloads:'path:"setup.py"'},doctr:{prettyLabel:"docTR",repoName:"doctr",repoUrl:"https://github.com/mindee/doctr"},edsnlp:{prettyLabel:"EDS-NLP",repoName:"edsnlp",repoUrl:"https://github.com/aphp/edsnlp",docsUrl:"https://aphp.github.io/edsnlp/latest/",filter:!1,snippets:e=>{let t=B(e.id).replaceAll("-","_");return[`# Load it from the Hub directly
486
+ import edsnlp
487
+ nlp = edsnlp.load("${e.id}")
488
+ `,`# Or install it as a package
489
+ !pip install git+https://huggingface.co/${e.id}
490
+
491
+ # and import it as a module
492
+ import ${t}
493
+
494
+ nlp = ${t}.load() # or edsnlp.load("${t}")
495
+ `]},countDownloads:'path_filename:"config" AND path_extension:"cfg"'},elm:{prettyLabel:"ELM",repoName:"elm",repoUrl:"https://github.com/slicex-ai/elm",filter:!1,countDownloads:'path_filename:"slicex_elm_config" AND path_extension:"json"'},espnet:{prettyLabel:"ESPnet",repoName:"ESPnet",repoUrl:"https://github.com/espnet/espnet",docsUrl:"https://huggingface.co/docs/hub/espnet",snippets:e=>{if(e.tags.includes("text-to-speech"))return[`from espnet2.bin.tts_inference import Text2Speech
496
+
497
+ model = Text2Speech.from_pretrained("${e.id}")
498
+
499
+ speech, *_ = model("text to generate speech from")`];if(e.tags.includes("automatic-speech-recognition"))return[`from espnet2.bin.asr_inference import Speech2Text
500
+
501
+ model = Speech2Text.from_pretrained(
502
+ "${e.id}"
503
+ )
504
+
505
+ speech, rate = soundfile.read("speech.wav")
506
+ text, *_ = model(speech)[0]`];return["unknown model type (must be text-to-speech or automatic-speech-recognition)"]},filter:!0},fairseq:{prettyLabel:"Fairseq",repoName:"fairseq",repoUrl:"https://github.com/pytorch/fairseq",snippets:e=>[`from fairseq.checkpoint_utils import load_model_ensemble_and_task_from_hf_hub
507
+
508
+ models, cfg, task = load_model_ensemble_and_task_from_hf_hub(
509
+ "${e.id}"
510
+ )`],filter:!0},fastai:{prettyLabel:"fastai",repoName:"fastai",repoUrl:"https://github.com/fastai/fastai",docsUrl:"https://huggingface.co/docs/hub/fastai",snippets:e=>[`from huggingface_hub import from_pretrained_fastai
511
+
512
+ learn = from_pretrained_fastai("${e.id}")`],filter:!0},fastprint:{prettyLabel:"Fast Print",repoName:"Fast Print",repoUrl:"https://huggingface.co/OpenPeerAI/FastPrint",countDownloads:'path_extension:"cs"'},fasttext:{prettyLabel:"fastText",repoName:"fastText",repoUrl:"https://fasttext.cc/",snippets:e=>[`from huggingface_hub import hf_hub_download
513
+ import fasttext
514
+
515
+ model = fasttext.load_model(hf_hub_download("${e.id}", "model.bin"))`],filter:!0,countDownloads:'path_extension:"bin"'},fixer:{prettyLabel:"Fixer",repoName:"Fixer",repoUrl:"https://github.com/nv-tlabs/Fixer",filter:!1,countDownloads:'path:"pretrained/pretrained_fixer.pkl"'},flair:{prettyLabel:"Flair",repoName:"Flair",repoUrl:"https://github.com/flairNLP/flair",docsUrl:"https://huggingface.co/docs/hub/flair",snippets:e=>[`from flair.models import SequenceTagger
516
+
517
+ tagger = SequenceTagger.load("${e.id}")`],filter:!0,countDownloads:'path:"pytorch_model.bin"'},fme:{prettyLabel:"Full Model Emulation",repoName:"Full Model Emulation",repoUrl:"https://github.com/ai2cm/ace",docsUrl:"https://ai2-climate-emulator.readthedocs.io/en/latest/",filter:!1,countDownloads:'path_extension:"tar"'},"gemma.cpp":{prettyLabel:"gemma.cpp",repoName:"gemma.cpp",repoUrl:"https://github.com/google/gemma.cpp",filter:!1,countDownloads:'path_extension:"sbs"'},"geometry-crafter":{prettyLabel:"GeometryCrafter",repoName:"GeometryCrafter",repoUrl:"https://github.com/TencentARC/GeometryCrafter",countDownloads:'path:"point_map_vae/diffusion_pytorch_model.safetensors"'},gliner:{prettyLabel:"GLiNER",repoName:"GLiNER",repoUrl:"https://github.com/urchade/GLiNER",snippets:e=>[`from gliner import GLiNER
518
+
519
+ model = GLiNER.from_pretrained("${e.id}")`],filter:!1,countDownloads:'path:"gliner_config.json"'},gliner2:{prettyLabel:"GLiNER2",repoName:"GLiNER2",repoUrl:"https://github.com/fastino-ai/GLiNER2",snippets:e=>[`from gliner2 import GLiNER2
520
+
521
+ model = GLiNER2.from_pretrained("${e.id}")
522
+
523
+ # Extract entities
524
+ text = "Apple CEO Tim Cook announced iPhone 15 in Cupertino yesterday."
525
+ result = extractor.extract_entities(text, ["company", "person", "product", "location"])
526
+
527
+ print(result)`],filter:!1},"glyph-byt5":{prettyLabel:"Glyph-ByT5",repoName:"Glyph-ByT5",repoUrl:"https://github.com/AIGText/Glyph-ByT5",filter:!1,countDownloads:'path:"checkpoints/byt5_model.pt"'},grok:{prettyLabel:"Grok",repoName:"Grok",repoUrl:"https://github.com/xai-org/grok-1",filter:!1,countDownloads:'path:"ckpt/tensor00000_000" OR path:"ckpt-0/tensor00000_000"'},hallo:{prettyLabel:"Hallo",repoName:"Hallo",repoUrl:"https://github.com/fudan-generative-vision/hallo",countDownloads:'path:"hallo/net.pth"'},hermes:{prettyLabel:"HERMES",repoName:"HERMES",repoUrl:"https://github.com/LMD0311/HERMES",filter:!1,countDownloads:'path:"ckpt/hermes_final.pth"'},hezar:{prettyLabel:"Hezar",repoName:"Hezar",repoUrl:"https://github.com/hezarai/hezar",docsUrl:"https://hezarai.github.io/hezar",countDownloads:'path:"model_config.yaml" OR path:"embedding/embedding_config.yaml"'},htrflow:{prettyLabel:"HTRflow",repoName:"HTRflow",repoUrl:"https://github.com/AI-Riksarkivet/htrflow",docsUrl:"https://ai-riksarkivet.github.io/htrflow",snippets:e=>[`# CLI usage
528
+ # see docs: https://ai-riksarkivet.github.io/htrflow/latest/getting_started/quick_start.html
529
+ htrflow pipeline <path/to/pipeline.yaml> <path/to/image>`,`# Python usage
530
+ from htrflow.pipeline.pipeline import Pipeline
531
+ from htrflow.pipeline.steps import Task
532
+ from htrflow.models.framework.model import ModelClass
533
+
534
+ pipeline = Pipeline(
535
+ [
536
+ Task(
537
+ ModelClass, {"model": "${e.id}"}, {}
538
+ ),
539
+ ])`]},"hunyuan-dit":{prettyLabel:"HunyuanDiT",repoName:"HunyuanDiT",repoUrl:"https://github.com/Tencent/HunyuanDiT",countDownloads:'path:"pytorch_model_ema.pt" OR path:"pytorch_model_distill.pt"'},"hunyuan3d-2":{prettyLabel:"Hunyuan3D-2",repoName:"Hunyuan3D-2",repoUrl:"https://github.com/Tencent/Hunyuan3D-2",countDownloads:'path_filename:"model_index" OR path_filename:"config"'},"hunyuanworld-voyager":{prettyLabel:"HunyuanWorld-voyager",repoName:"HunyuanWorld-voyager",repoUrl:"https://github.com/Tencent-Hunyuan/HunyuanWorld-Voyager"},"image-matching-models":{prettyLabel:"Image Matching Models",repoName:"Image Matching Models",repoUrl:"https://github.com/alexstoken/image-matching-models",filter:!1,countDownloads:'path_extension:"safetensors"'},imstoucan:{prettyLabel:"IMS Toucan",repoName:"IMS-Toucan",repoUrl:"https://github.com/DigitalPhonetics/IMS-Toucan",countDownloads:'path:"embedding_gan.pt" OR path:"Vocoder.pt" OR path:"ToucanTTS.pt"'},"index-tts":{prettyLabel:"IndexTTS",repoName:"IndexTTS",repoUrl:"https://github.com/index-tts/index-tts",snippets:e=>[`# Download model
540
+ from huggingface_hub import snapshot_download
541
+
542
+ snapshot_download(${e.id}, local_dir="checkpoints")
543
+
544
+ from indextts.infer import IndexTTS
545
+
546
+ # Ensure config.yaml is present in the checkpoints directory
547
+ tts = IndexTTS(model_dir="checkpoints", cfg_path="checkpoints/config.yaml")
548
+
549
+ voice = "path/to/your/reference_voice.wav" # Path to the voice reference audio file
550
+ text = "Hello, how are you?"
551
+ output_path = "output_index.wav"
552
+
553
+ tts.infer(voice, text, output_path)`],filter:!1},infinitetalk:{prettyLabel:"InfiniteTalk",repoName:"InfiniteTalk",repoUrl:"https://github.com/MeiGen-AI/InfiniteTalk",filter:!1,countDownloads:'path_extension:"safetensors"'},"infinite-you":{prettyLabel:"InfiniteYou",repoName:"InfiniteYou",repoUrl:"https://github.com/bytedance/InfiniteYou",filter:!1,countDownloads:'path:"infu_flux_v1.0/sim_stage1/image_proj_model.bin" OR path:"infu_flux_v1.0/aes_stage2/image_proj_model.bin"'},keras:{prettyLabel:"Keras",repoName:"Keras",repoUrl:"https://github.com/keras-team/keras",docsUrl:"https://huggingface.co/docs/hub/keras",snippets:e=>[`# Available backend options are: "jax", "torch", "tensorflow".
554
+ import os
555
+ os.environ["KERAS_BACKEND"] = "jax"
556
+
557
+ import keras
558
+
559
+ model = keras.saving.load_model("hf://${e.id}")
560
+ `],filter:!0,countDownloads:'path:"config.json" OR path_extension:"keras"'},"tf-keras":{prettyLabel:"TF-Keras",repoName:"TF-Keras",repoUrl:"https://github.com/keras-team/tf-keras",docsUrl:"https://huggingface.co/docs/hub/tf-keras",snippets:e=>[`# Note: 'keras<3.x' or 'tf_keras' must be installed (legacy)
561
+ # See https://github.com/keras-team/tf-keras for more details.
562
+ from huggingface_hub import from_pretrained_keras
563
+
564
+ model = from_pretrained_keras("${e.id}")
565
+ `],countDownloads:'path:"saved_model.pb"'},"keras-hub":{prettyLabel:"KerasHub",repoName:"KerasHub",repoUrl:"https://github.com/keras-team/keras-hub",docsUrl:"https://keras.io/keras_hub/",snippets:e=>{let t=e.id,i=e.config?.keras_hub?.tasks??[],o=[];for(let[e,a]of Object.entries(P))i.includes(e)&&o.push(a(t));for(let e of i)Object.keys(P).includes(e)||o.push(R(e,t));return o.push(`
566
+ import keras_hub
567
+
568
+ # Create a Backbone model unspecialized for any task
569
+ backbone = keras_hub.models.Backbone.from_preset("hf://${t}")
570
+ `),o},filter:!0},kernels:{prettyLabel:"Kernels",repoName:"Kernels",repoUrl:"https://github.com/huggingface/kernels",docsUrl:"https://huggingface.co/docs/kernels",snippets:e=>[`# !pip install kernels
571
+
572
+ from kernels import get_kernel
573
+
574
+ kernel = get_kernel("${e.id}")`],countDownloads:'path_filename:"_ops" AND path_extension:"py"'},"kimi-audio":{prettyLabel:"KimiAudio",repoName:"KimiAudio",repoUrl:"https://github.com/MoonshotAI/Kimi-Audio",snippets:e=>[`# Example usage for KimiAudio
575
+ # pip install git+https://github.com/MoonshotAI/Kimi-Audio.git
576
+
577
+ from kimia_infer.api.kimia import KimiAudio
578
+
579
+ model = KimiAudio(model_path="${e.id}", load_detokenizer=True)
580
+
581
+ sampling_params = {
582
+ "audio_temperature": 0.8,
583
+ "audio_top_k": 10,
584
+ "text_temperature": 0.0,
585
+ "text_top_k": 5,
586
+ }
587
+
588
+ # For ASR
589
+ asr_audio = "asr_example.wav"
590
+ messages_asr = [
591
+ {"role": "user", "message_type": "text", "content": "Please transcribe the following audio:"},
592
+ {"role": "user", "message_type": "audio", "content": asr_audio}
593
+ ]
594
+ _, text = model.generate(messages_asr, **sampling_params, output_type="text")
595
+ print(text)
596
+
597
+ # For Q&A
598
+ qa_audio = "qa_example.wav"
599
+ messages_conv = [{"role": "user", "message_type": "audio", "content": qa_audio}]
600
+ wav, text = model.generate(messages_conv, **sampling_params, output_type="both")
601
+ sf.write("output_audio.wav", wav.cpu().view(-1).numpy(), 24000)
602
+ print(text)
603
+ `],filter:!1},kittentts:{prettyLabel:"KittenTTS",repoName:"KittenTTS",repoUrl:"https://github.com/KittenML/KittenTTS",snippets:e=>[`from kittentts import KittenTTS
604
+ m = KittenTTS("${e.id}")
605
+
606
+ audio = m.generate("This high quality TTS model works without a GPU")
607
+
608
+ # Save the audio
609
+ import soundfile as sf
610
+ sf.write('output.wav', audio, 24000)`]},kronos:{prettyLabel:"KRONOS",repoName:"KRONOS",repoUrl:"https://github.com/mahmoodlab/KRONOS",filter:!1,countDownloads:'path_extension:"pt"'},k2:{prettyLabel:"K2",repoName:"k2",repoUrl:"https://github.com/k2-fsa/k2"},"lightning-ir":{prettyLabel:"Lightning IR",repoName:"Lightning IR",repoUrl:"https://github.com/webis-de/lightning-ir",snippets:e=>e.tags.includes("bi-encoder")?[`#install from https://github.com/webis-de/lightning-ir
611
+
612
+ from lightning_ir import BiEncoderModule
613
+ model = BiEncoderModule("${e.id}")
614
+
615
+ model.score("query", ["doc1", "doc2", "doc3"])`]:e.tags.includes("cross-encoder")?[`#install from https://github.com/webis-de/lightning-ir
616
+
617
+ from lightning_ir import CrossEncoderModule
618
+ model = CrossEncoderModule("${e.id}")
619
+
620
+ model.score("query", ["doc1", "doc2", "doc3"])`]:[`#install from https://github.com/webis-de/lightning-ir
621
+
622
+ from lightning_ir import BiEncoderModule, CrossEncoderModule
623
+
624
+ # depending on the model type, use either BiEncoderModule or CrossEncoderModule
625
+ model = BiEncoderModule("${e.id}")
626
+ # model = CrossEncoderModule("${e.id}")
627
+
628
+ model.score("query", ["doc1", "doc2", "doc3"])`]},litert:{prettyLabel:"LiteRT",repoName:"LiteRT",repoUrl:"https://github.com/google-ai-edge/LiteRT",filter:!1,countDownloads:'path_extension:"tflite"'},"litert-lm":{prettyLabel:"LiteRT-LM",repoName:"LiteRT-LM",repoUrl:"https://github.com/google-ai-edge/LiteRT-LM",filter:!1,countDownloads:'path_extension:"litertlm" OR path_extension:"task"'},lerobot:{prettyLabel:"LeRobot",repoName:"LeRobot",repoUrl:"https://github.com/huggingface/lerobot",docsUrl:"https://huggingface.co/docs/lerobot",filter:!1,snippets:e=>{if(e.tags.includes("smolvla")){let t=[`# See https://github.com/huggingface/lerobot?tab=readme-ov-file#installation for more details
629
+ git clone https://github.com/huggingface/lerobot.git
630
+ cd lerobot
631
+ pip install -e .[smolvla]`,`# Launch finetuning on your dataset
632
+ python lerobot/scripts/train.py \\
633
+ --policy.path=${e.id} \\
634
+ --dataset.repo_id=lerobot/svla_so101_pickplace \\
635
+ --batch_size=64 \\
636
+ --steps=20000 \\
637
+ --output_dir=outputs/train/my_smolvla \\
638
+ --job_name=my_smolvla_training \\
639
+ --policy.device=cuda \\
640
+ --wandb.enable=true`];return"lerobot/smolvla_base"!==e.id&&t.push(`# Run the policy using the record function
641
+ python -m lerobot.record \\
642
+ --robot.type=so101_follower \\
643
+ --robot.port=/dev/ttyACM0 \\ # <- Use your port
644
+ --robot.id=my_blue_follower_arm \\ # <- Use your robot id
645
+ --robot.cameras="{ front: {type: opencv, index_or_path: 8, width: 640, height: 480, fps: 30}}" \\ # <- Use your cameras
646
+ --dataset.single_task="Grasp a lego block and put it in the bin." \\ # <- Use the same task description you used in your dataset recording
647
+ --dataset.repo_id=HF_USER/dataset_name \\ # <- This will be the dataset name on HF Hub
648
+ --dataset.episode_time_s=50 \\
649
+ --dataset.num_episodes=10 \\
650
+ --policy.path=${e.id}`),t}return[]}},lightglue:{prettyLabel:"LightGlue",repoName:"LightGlue",repoUrl:"https://github.com/cvg/LightGlue",filter:!1,countDownloads:'path_extension:"pth" OR path:"config.json"'},liveportrait:{prettyLabel:"LivePortrait",repoName:"LivePortrait",repoUrl:"https://github.com/KwaiVGI/LivePortrait",filter:!1,countDownloads:'path:"liveportrait/landmark.onnx"'},"llama-cpp-python":{prettyLabel:"llama-cpp-python",repoName:"llama-cpp-python",repoUrl:"https://github.com/abetlen/llama-cpp-python",snippets:e=>{let t=[`# !pip install llama-cpp-python
651
+
652
+ from llama_cpp import Llama
653
+
654
+ llm = Llama.from_pretrained(
655
+ repo_id="${e.id}",
656
+ filename="{{GGUF_FILE}}",
657
+ )
658
+ `];if(e.tags.includes("conversational")){var i;let o,a=function(e,t=!1,i=!1){if(e.pipeline_tag){let o=E[e.pipeline_tag];if(o){let a=o(e);if("string"==typeof a&&(t&&(a=a.replace(/(?:(?:\r?\n|\r)\t*)|\t+/g," ")),i)){let e=a.match(/^"(.+)"$/s);a=e?e[1]:a}return a}}return"No input example has been defined for this model task."}(e);t.push(`llm.create_chat_completion(
659
+ messages = ${(i={attributeKeyQuotes:!0,indent:" "},o=JSON.stringify(a,null," "),i?.indent&&(o=o.replaceAll("\n",`
660
+ ${i.indent}`)),!i?.attributeKeyQuotes&&(o=o.replace(/"([^"]+)":/g,"$1:")),i?.customContentEscaper&&(o=i.customContentEscaper(o)),o)}
661
+ )`)}else t.push(`output = llm(
662
+ "Once upon a time,",
663
+ max_tokens=512,
664
+ echo=True
665
+ )
666
+ print(output)`);return t}},"mini-omni2":{prettyLabel:"Mini-Omni2",repoName:"Mini-Omni2",repoUrl:"https://github.com/gpt-omni/mini-omni2",countDownloads:'path:"model_config.yaml"'},mindspore:{prettyLabel:"MindSpore",repoName:"mindspore",repoUrl:"https://github.com/mindspore-ai/mindspore"},"magi-1":{prettyLabel:"MAGI-1",repoName:"MAGI-1",repoUrl:"https://github.com/SandAI-org/MAGI-1",countDownloads:'path:"ckpt/vae/config.json"'},"magenta-realtime":{prettyLabel:"Magenta RT",repoName:"Magenta RT",repoUrl:"https://github.com/magenta/magenta-realtime",countDownloads:'path:"checkpoints/llm_base_x4286_c1860k.tar" OR path:"checkpoints/llm_large_x3047_c1860k.tar" OR path:"checkpoints/llm_large_x3047_c1860k/checkpoint"'},"mamba-ssm":{prettyLabel:"MambaSSM",repoName:"MambaSSM",repoUrl:"https://github.com/state-spaces/mamba",filter:!1,snippets:e=>[`from mamba_ssm import MambaLMHeadModel
667
+
668
+ model = MambaLMHeadModel.from_pretrained("${e.id}")`]},"mars5-tts":{prettyLabel:"MARS5-TTS",repoName:"MARS5-TTS",repoUrl:"https://github.com/Camb-ai/MARS5-TTS",filter:!1,countDownloads:'path:"mars5_ar.safetensors"',snippets:e=>[`# Install from https://github.com/Camb-ai/MARS5-TTS
669
+
670
+ from inference import Mars5TTS
671
+ mars5 = Mars5TTS.from_pretrained("${e.id}")`]},matanyone:{prettyLabel:"MatAnyone",repoName:"MatAnyone",repoUrl:"https://github.com/pq-yang/MatAnyone",snippets:e=>[`# Install from https://github.com/pq-yang/MatAnyone.git
672
+
673
+ from matanyone.model.matanyone import MatAnyone
674
+ model = MatAnyone.from_pretrained("${e.id}")`,`
675
+ from matanyone import InferenceCore
676
+ processor = InferenceCore("${e.id}")`],filter:!1},"mesh-anything":{prettyLabel:"MeshAnything",repoName:"MeshAnything",repoUrl:"https://github.com/buaacyw/MeshAnything",filter:!1,countDownloads:'path:"MeshAnything_350m.pth"',snippets:()=>[`# Install from https://github.com/buaacyw/MeshAnything.git
677
+
678
+ from MeshAnything.models.meshanything import MeshAnything
679
+
680
+ # refer to https://github.com/buaacyw/MeshAnything/blob/main/main.py#L91 on how to define args
681
+ # and https://github.com/buaacyw/MeshAnything/blob/main/app.py regarding usage
682
+ model = MeshAnything(args)`]},merlin:{prettyLabel:"Merlin",repoName:"Merlin",repoUrl:"https://github.com/StanfordMIMI/Merlin",filter:!1,countDownloads:'path_extension:"pt"'},medvae:{prettyLabel:"MedVAE",repoName:"MedVAE",repoUrl:"https://github.com/StanfordMIMI/MedVAE",filter:!1,countDownloads:'path_extension:"ckpt"'},mitie:{prettyLabel:"MITIE",repoName:"MITIE",repoUrl:"https://github.com/mit-nlp/MITIE",countDownloads:'path_filename:"total_word_feature_extractor"'},"ml-agents":{prettyLabel:"ml-agents",repoName:"ml-agents",repoUrl:"https://github.com/Unity-Technologies/ml-agents",docsUrl:"https://huggingface.co/docs/hub/ml-agents",snippets:e=>[`mlagents-load-from-hf --repo-id="${e.id}" --local-dir="./download: string[]s"`],filter:!0,countDownloads:'path_extension:"onnx"'},mlx:{prettyLabel:"MLX",repoName:"MLX",repoUrl:"https://github.com/ml-explore/mlx-examples/tree/main",snippets:e=>{if("image-text-to-text"===e.pipeline_tag)return[`# Make sure mlx-vlm is installed
683
+ # pip install --upgrade mlx-vlm
684
+
685
+ from mlx_vlm import load, generate
686
+ from mlx_vlm.prompt_utils import apply_chat_template
687
+ from mlx_vlm.utils import load_config
688
+
689
+ # Load the model
690
+ model, processor = load("${e.id}")
691
+ config = load_config("${e.id}")
692
+
693
+ # Prepare input
694
+ image = ["http://images.cocodataset.org/val2017/000000039769.jpg"]
695
+ prompt = "Describe this image."
696
+
697
+ # Apply chat template
698
+ formatted_prompt = apply_chat_template(
699
+ processor, config, prompt, num_images=1
700
+ )
701
+
702
+ # Generate output
703
+ output = generate(model, processor, formatted_prompt, image)
704
+ print(output)`];if("text-generation"===e.pipeline_tag)if(e.tags.includes("conversational"))return[`# Make sure mlx-lm is installed
705
+ # pip install --upgrade mlx-lm
706
+
707
+ # Generate text with mlx-lm
708
+ from mlx_lm import load, generate
709
+
710
+ model, tokenizer = load("${e.id}")
711
+
712
+ prompt = "Write a story about Einstein"
713
+ messages = [{"role": "user", "content": prompt}]
714
+ prompt = tokenizer.apply_chat_template(
715
+ messages, add_generation_prompt=True
716
+ )
717
+
718
+ text = generate(model, tokenizer, prompt=prompt, verbose=True)`];else return[`# Make sure mlx-lm is installed
719
+ # pip install --upgrade mlx-lm
720
+ # if on a CUDA device, also pip install mlx[cuda]
721
+
722
+ # Generate text with mlx-lm
723
+ from mlx_lm import load, generate
724
+
725
+ model, tokenizer = load("${e.id}")
726
+
727
+ prompt = "Once upon a time in"
728
+ text = generate(model, tokenizer, prompt=prompt, verbose=True)`];return[`# Download the model from the Hub
729
+ pip install huggingface_hub[hf_xet]
730
+
731
+ huggingface-cli download --local-dir ${B(e.id)} ${e.id}`]},filter:!0},"mlx-image":{prettyLabel:"mlx-image",repoName:"mlx-image",repoUrl:"https://github.com/riccardomusmeci/mlx-image",docsUrl:"https://huggingface.co/docs/hub/mlx-image",snippets:e=>[`from mlxim.model import create_model
732
+
733
+ model = create_model(${e.id})`],filter:!1,countDownloads:'path:"model.safetensors"'},"mlc-llm":{prettyLabel:"MLC-LLM",repoName:"MLC-LLM",repoUrl:"https://github.com/mlc-ai/mlc-llm",docsUrl:"https://llm.mlc.ai/docs/",filter:!1,countDownloads:'path:"mlc-chat-config.json"'},model2vec:{prettyLabel:"Model2Vec",repoName:"model2vec",repoUrl:"https://github.com/MinishLab/model2vec",snippets:e=>[`from model2vec import StaticModel
734
+
735
+ model = StaticModel.from_pretrained("${e.id}")`],filter:!1},moshi:{prettyLabel:"Moshi",repoName:"Moshi",repoUrl:"https://github.com/kyutai-labs/moshi",filter:!1,countDownloads:'path:"tokenizer-e351c8d8-checkpoint125.safetensors"'},mtvcraft:{prettyLabel:"MTVCraft",repoName:"MTVCraft",repoUrl:"https://github.com/baaivision/MTVCraft",filter:!1,countDownloads:'path:"vae/3d-vae.pt"'},nemo:{prettyLabel:"NeMo",repoName:"NeMo",repoUrl:"https://github.com/NVIDIA/NeMo",snippets:e=>{let t;return e.tags.includes("automatic-speech-recognition")&&(t=[`import nemo.collections.asr as nemo_asr
736
+ asr_model = nemo_asr.models.ASRModel.from_pretrained("${e.id}")
737
+
738
+ transcriptions = asr_model.transcribe(["file.wav"])`]),t??["# tag did not correspond to a valid NeMo domain."]},filter:!0,countDownloads:'path_extension:"nemo" OR path:"model_config.yaml" OR path_extension:"json"'},"open-oasis":{prettyLabel:"open-oasis",repoName:"open-oasis",repoUrl:"https://github.com/etched-ai/open-oasis",countDownloads:'path:"oasis500m.safetensors"'},open_clip:{prettyLabel:"OpenCLIP",repoName:"OpenCLIP",repoUrl:"https://github.com/mlfoundations/open_clip",snippets:e=>[`import open_clip
739
+
740
+ model, preprocess_train, preprocess_val = open_clip.create_model_and_transforms('hf-hub:${e.id}')
741
+ tokenizer = open_clip.get_tokenizer('hf-hub:${e.id}')`],filter:!0,countDownloads:`path:"open_clip_model.safetensors"
742
+ OR path:"model.safetensors"
743
+ OR path:"open_clip_pytorch_model.bin"
744
+ OR path:"pytorch_model.bin"`},openpeerllm:{prettyLabel:"OpenPeerLLM",repoName:"OpenPeerLLM",repoUrl:"https://huggingface.co/openpeerai/openpeerllm",docsUrl:"https://huggingface.co/OpenPeerAI/OpenPeerLLM/blob/main/README.md",countDownloads:'path:".meta-huggingface.json"',filter:!1},"open-sora":{prettyLabel:"Open-Sora",repoName:"Open-Sora",repoUrl:"https://github.com/hpcaitech/Open-Sora",filter:!1,countDownloads:'path:"Open_Sora_v2.safetensors"'},outetts:{prettyLabel:"OuteTTS",repoName:"OuteTTS",repoUrl:"https://github.com/edwko/OuteTTS",snippets:e=>{let t=e.tags??[];return t.includes("gguf")||t.includes("onnx")?[]:[`
745
+ import outetts
746
+
747
+ enum = outetts.Models("${e.id}".split("/", 1)[1]) # VERSION_1_0_SIZE_1B
748
+ cfg = outetts.ModelConfig.auto_config(enum, outetts.Backend.HF)
749
+ tts = outetts.Interface(cfg)
750
+
751
+ speaker = tts.load_default_speaker("EN-FEMALE-1-NEUTRAL")
752
+ tts.generate(
753
+ outetts.GenerationConfig(
754
+ text="Hello there, how are you doing?",
755
+ speaker=speaker,
756
+ )
757
+ ).save("output.wav")
758
+ `]},filter:!1},paddlenlp:{prettyLabel:"paddlenlp",repoName:"PaddleNLP",repoUrl:"https://github.com/PaddlePaddle/PaddleNLP",docsUrl:"https://huggingface.co/docs/hub/paddlenlp",snippets:e=>{if(!e.config?.architectures?.[0])return[`# ⚠️ Type of model unknown
759
+ from paddlenlp.transformers import AutoTokenizer, AutoModel
760
+
761
+ tokenizer = AutoTokenizer.from_pretrained("${e.id}", from_hf_hub=True)
762
+ model = AutoModel.from_pretrained("${e.id}", from_hf_hub=True)`];{let t=e.config.architectures[0];return[`from paddlenlp.transformers import AutoTokenizer, ${t}
763
+
764
+ tokenizer = AutoTokenizer.from_pretrained("${e.id}", from_hf_hub=True)
765
+ model = ${t}.from_pretrained("${e.id}", from_hf_hub=True)`]}},filter:!0,countDownloads:'path:"model_config.json"'},PaddleOCR:{prettyLabel:"PaddleOCR",repoName:"PaddleOCR",repoUrl:"https://github.com/PaddlePaddle/PaddleOCR",docsUrl:"https://www.paddleocr.ai/",snippets:e=>{let t={textline_detection:{className:"TextDetection"},textline_recognition:{className:"TextRecognition"},seal_text_detection:{className:"SealTextDetection"},doc_img_unwarping:{className:"TextImageUnwarping"},doc_img_orientation_classification:{className:"DocImgOrientationClassification"},textline_orientation_classification:{className:"TextLineOrientationClassification"},chart_parsing:{className:"ChartParsing"},formula_recognition:{className:"FormulaRecognition"},layout_detection:{className:"LayoutDetection"},table_cells_detection:{className:"TableCellsDetection"},wired_table_classification:{className:"TableClassification"},table_structure_recognition:{className:"TableStructureRecognition"}};if(e.tags.includes("doc_vlm"))return[`# 1. See https://www.paddlepaddle.org.cn/en/install to install paddlepaddle
766
+ # 2. pip install paddleocr
767
+
768
+ from paddleocr import DocVLM
769
+ model = DocVLM(model_name="${B(e.id)}")
770
+ output = model.predict(
771
+ input={"image": "path/to/image.png", "query": "Parsing this image and output the content in Markdown format."},
772
+ batch_size=1
773
+ )
774
+ for res in output:
775
+ res.print()
776
+ res.save_to_json(save_path="./output/res.json")`];if(e.tags.includes("document-parse"))return[`# See https://www.paddleocr.ai/latest/version3.x/pipeline_usage/PaddleOCR-VL.html to installation
777
+
778
+ from paddleocr import PaddleOCRVL
779
+ pipeline = PaddleOCRVL()
780
+ output = pipeline.predict("path/to/document_image.png")
781
+ for res in output:
782
+ res.print()
783
+ res.save_to_json(save_path="output")
784
+ res.save_to_markdown(save_path="output")`];for(let i of e.tags)if(i in t){let{className:o}=t[i];return[`# 1. See https://www.paddlepaddle.org.cn/en/install to install paddlepaddle
785
+ # 2. pip install paddleocr
786
+
787
+ from paddleocr import ${o}
788
+ model = ${o}(model_name="${B(e.id)}")
789
+ output = model.predict(input="path/to/image.png", batch_size=1)
790
+ for res in output:
791
+ res.print()
792
+ res.save_to_img(save_path="./output/")
793
+ res.save_to_json(save_path="./output/res.json")`]}return[`# Please refer to the document for information on how to use the model.
794
+ # https://paddlepaddle.github.io/PaddleOCR/latest/en/version3.x/module_usage/module_overview.html`]},filter:!0,countDownloads:'path_extension:"safetensors" OR path:"inference.pdiparams"'},peft:{prettyLabel:"PEFT",repoName:"PEFT",repoUrl:"https://github.com/huggingface/peft",snippets:e=>{let{base_model_name_or_path:t,task_type:i}=e.config?.peft??{},o=(e=>{switch(e){case"CAUSAL_LM":return"CausalLM";case"SEQ_2_SEQ_LM":return"Seq2SeqLM";case"TOKEN_CLS":return"TokenClassification";case"SEQ_CLS":return"SequenceClassification";default:return}})(i);return o?t?[`from peft import PeftModel
795
+ from transformers import AutoModelFor${o}
796
+
797
+ base_model = AutoModelFor${o}.from_pretrained("${t}")
798
+ model = PeftModel.from_pretrained(base_model, "${e.id}")`]:["Base model is not found."]:["Task type is invalid."]},filter:!0,countDownloads:'path:"adapter_config.json"'},"perception-encoder":{prettyLabel:"PerceptionEncoder",repoName:"PerceptionModels",repoUrl:"https://github.com/facebookresearch/perception_models",filter:!1,snippets:e=>{let t=`# Use PE-Core models as CLIP models
799
+ import core.vision_encoder.pe as pe
800
+
801
+ model = pe.CLIP.from_config("${e.id}", pretrained=True)`,i=`# Use any PE model as a vision encoder
802
+ import core.vision_encoder.pe as pe
803
+
804
+ model = pe.VisionTransformer.from_config("${e.id}", pretrained=True)`;return e.id.includes("Core")?[t,i]:[i]},countDownloads:'path_extension:"pt"'},"phantom-wan":{prettyLabel:"Phantom",repoName:"Phantom",repoUrl:"https://github.com/Phantom-video/Phantom",snippets:e=>[`from huggingface_hub import snapshot_download
805
+ from phantom_wan import WANI2V, configs
806
+
807
+ checkpoint_dir = snapshot_download("${e.id}")
808
+ wan_i2v = WanI2V(
809
+ config=configs.WAN_CONFIGS['i2v-14B'],
810
+ checkpoint_dir=checkpoint_dir,
811
+ )
812
+ video = wan_i2v.generate(text_prompt, image_prompt)`],filter:!1,countDownloads:'path_extension:"pth"'},"pruna-ai":{prettyLabel:"Pruna AI",repoName:"Pruna AI",repoUrl:"https://github.com/PrunaAI/pruna",snippets:e=>{var t;let i,o,a,n;return(i=(i=e.tags.includes("diffusers")?N(e).map(e=>e.replace(/\b\w*Pipeline\w*\b/g,"PrunaModel").replace(/from diffusers import ([^,\n]*PrunaModel[^,\n]*)/g,"").replace(/from diffusers import ([^,\n]+),?\s*([^,\n]*PrunaModel[^,\n]*)/g,"from diffusers import $1").replace(/from diffusers import\s*(\n|$)/g,"").replace(/from diffusers import PrunaModel/g,"from pruna import PrunaModel").replace(/from diffusers import ([^,\n]+), PrunaModel/g,"from diffusers import $1").replace(/from diffusers import PrunaModel, ([^,\n]+)/g,"from diffusers import $1").replace(/\n\n+/g,"\n").trim()):e.tags.includes("transformers")?(o=(t=e).transformersInfo,a=U(t).map(e=>e.replace(/from transformers import pipeline/g,"from pruna import PrunaModel").replace(/pipeline\([^)]*\)/g,`PrunaModel.from_pretrained("${t.id}")`)),o?.auto_model&&(a=a.map(e=>e.replace(RegExp(`from transformers import ${o.auto_model}
813
+ ?`,"g"),"").replace(RegExp(`${o.auto_model}.from_pretrained`,"g"),"PrunaModel.from_pretrained").replace(RegExp(`^.*from.*import.*(, *${o.auto_model})+.*$`,"gm"),e=>e.replace(RegExp(`, *${o.auto_model}`,"g"),"")))),a):(n=e,[`from pruna import PrunaModel
814
+ model = PrunaModel.from_pretrained("${n.id}")
815
+ `])).map(e=>/^from pruna import PrunaModel/m.test(e)?e:`from pruna import PrunaModel
816
+ ${e}`),e.tags.includes("pruna_pro-ai"))?i.map(e=>e.replace(/\bpruna\b/g,"pruna_pro").replace(/\bPrunaModel\b/g,"PrunaProModel")):i},docsUrl:"https://docs.pruna.ai"},pxia:{prettyLabel:"pxia",repoName:"pxia",repoUrl:"https://github.com/not-lain/pxia",snippets:e=>[`from pxia import AutoModel
817
+
818
+ model = AutoModel.from_pretrained("${e.id}")`],filter:!1},"pyannote-audio":{prettyLabel:"pyannote.audio",repoName:"pyannote-audio",repoUrl:"https://github.com/pyannote/pyannote-audio",snippets:e=>{if(e.tags.includes("pyannote-audio-pipeline"))return[`from pyannote.audio import Pipeline
819
+
820
+ pipeline = Pipeline.from_pretrained("${e.id}")
821
+
822
+ # inference on the whole file
823
+ pipeline("file.wav")
824
+
825
+ # inference on an excerpt
826
+ from pyannote.core import Segment
827
+ excerpt = Segment(start=2.0, end=5.0)
828
+
829
+ from pyannote.audio import Audio
830
+ waveform, sample_rate = Audio().crop("file.wav", excerpt)
831
+ pipeline({"waveform": waveform, "sample_rate": sample_rate})`];return[`from pyannote.audio import Model, Inference
832
+
833
+ model = Model.from_pretrained("${e.id}")
834
+ inference = Inference(model)
835
+
836
+ # inference on the whole file
837
+ inference("file.wav")
838
+
839
+ # inference on an excerpt
840
+ from pyannote.core import Segment
841
+ excerpt = Segment(start=2.0, end=5.0)
842
+ inference.crop("file.wav", excerpt)`]},filter:!0},"py-feat":{prettyLabel:"Py-Feat",repoName:"Py-Feat",repoUrl:"https://github.com/cosanlab/py-feat",docsUrl:"https://py-feat.org/",filter:!1},pythae:{prettyLabel:"pythae",repoName:"pythae",repoUrl:"https://github.com/clementchadebec/benchmark_VAE",snippets:e=>[`from pythae.models import AutoModel
843
+
844
+ model = AutoModel.load_from_hf_hub("${e.id}")`],filter:!1},quantumpeer:{prettyLabel:"QuantumPeer",repoName:"QuantumPeer",repoUrl:"https://github.com/OpenPeer-AI/QuantumPeer",filter:!1,countDownloads:'path_extension:"setup.py"'},recurrentgemma:{prettyLabel:"RecurrentGemma",repoName:"recurrentgemma",repoUrl:"https://github.com/google-deepmind/recurrentgemma",filter:!1,countDownloads:'path:"tokenizer.model"'},relik:{prettyLabel:"Relik",repoName:"Relik",repoUrl:"https://github.com/SapienzaNLP/relik",snippets:e=>[`from relik import Relik
845
+
846
+ relik = Relik.from_pretrained("${e.id}")`],filter:!1},refiners:{prettyLabel:"Refiners",repoName:"Refiners",repoUrl:"https://github.com/finegrain-ai/refiners",docsUrl:"https://refine.rs/",filter:!1,countDownloads:'path:"model.safetensors"'},renderformer:{prettyLabel:"RenderFormer",repoName:"RenderFormer",repoUrl:"https://github.com/microsoft/renderformer",snippets:e=>[`# Install from https://github.com/microsoft/renderformer
847
+
848
+ from renderformer import RenderFormerRenderingPipeline
849
+ pipeline = RenderFormerRenderingPipeline.from_pretrained("${e.id}")`],filter:!1},reverb:{prettyLabel:"Reverb",repoName:"Reverb",repoUrl:"https://github.com/revdotcom/reverb",filter:!1},rkllm:{prettyLabel:"RKLLM",repoName:"RKLLM",repoUrl:"https://github.com/airockchip/rknn-llm",countDownloads:'path_extension:"rkllm"'},saelens:{prettyLabel:"SAELens",repoName:"SAELens",repoUrl:"https://github.com/jbloomAus/SAELens",snippets:()=>[`# pip install sae-lens
850
+ from sae_lens import SAE
851
+
852
+ sae, cfg_dict, sparsity = SAE.from_pretrained(
853
+ release = "RELEASE_ID", # e.g., "gpt2-small-res-jb". See other options in https://github.com/jbloomAus/SAELens/blob/main/sae_lens/pretrained_saes.yaml
854
+ sae_id = "SAE_ID", # e.g., "blocks.8.hook_resid_pre". Won't always be a hook point
855
+ )`],filter:!1},sam2:{prettyLabel:"sam2",repoName:"sam2",repoUrl:"https://github.com/facebookresearch/segment-anything-2",filter:!1,snippets:e=>[`# Use SAM2 with images
856
+ import torch
857
+ from sam2.sam2_image_predictor import SAM2ImagePredictor
858
+
859
+ predictor = SAM2ImagePredictor.from_pretrained(${e.id})
860
+
861
+ with torch.inference_mode(), torch.autocast("cuda", dtype=torch.bfloat16):
862
+ predictor.set_image(<your_image>)
863
+ masks, _, _ = predictor.predict(<input_prompts>)`,`# Use SAM2 with videos
864
+ import torch
865
+ from sam2.sam2_video_predictor import SAM2VideoPredictor
866
+
867
+ predictor = SAM2VideoPredictor.from_pretrained(${e.id})
868
+
869
+ with torch.inference_mode(), torch.autocast("cuda", dtype=torch.bfloat16):
870
+ state = predictor.init_state(<your_video>)
871
+
872
+ # add new prompts and instantly get the output on the same frame
873
+ frame_idx, object_ids, masks = predictor.add_new_points(state, <your_prompts>):
874
+
875
+ # propagate the prompts to get masklets throughout the video
876
+ for frame_idx, object_ids, masks in predictor.propagate_in_video(state):
877
+ ...`],countDownloads:'path_extension:"pt"'},"sample-factory":{prettyLabel:"sample-factory",repoName:"sample-factory",repoUrl:"https://github.com/alex-petrenko/sample-factory",docsUrl:"https://huggingface.co/docs/hub/sample-factory",snippets:e=>[`python -m sample_factory.huggingface.load_from_hub -r ${e.id} -d ./train_dir`],filter:!0,countDownloads:'path:"cfg.json"'},"sap-rpt-1-oss":{prettyLabel:"sap-rpt-1-oss",repoName:"sap-rpt-1-oss",repoUrl:"https://github.com/SAP-samples/sap-rpt-1-oss",countDownloads:'path_extension:"pt"',snippets:()=>["pip install git+https://github.com/SAP-samples/sap-rpt-1-oss",`# Run a classification task
878
+ from sklearn.datasets import load_breast_cancer
879
+ from sklearn.metrics import accuracy_score
880
+ from sklearn.model_selection import train_test_split
881
+
882
+ from sap_rpt_oss import SAP_RPT_OSS_Classifier
883
+
884
+ # Load sample data
885
+ X, y = load_breast_cancer(return_X_y=True)
886
+ X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.5, random_state=42)
887
+
888
+ # Initialize a classifier, 8k context and 8-fold bagging gives best performance, reduce if running out of memory
889
+ clf = SAP_RPT_OSS_Classifier(max_context_size=8192, bagging=8)
890
+
891
+ clf.fit(X_train, y_train)
892
+
893
+ # Predict probabilities
894
+ prediction_probabilities = clf.predict_proba(X_test)
895
+ # Predict labels
896
+ predictions = clf.predict(X_test)
897
+ print("Accuracy", accuracy_score(y_test, predictions))`,`# Run a regression task
898
+ from sklearn.datasets import fetch_openml
899
+ from sklearn.metrics import r2_score
900
+ from sklearn.model_selection import train_test_split
901
+
902
+ from sap_rpt_oss import SAP_RPT_OSS_Regressor
903
+
904
+ # Load sample data
905
+ df = fetch_openml(data_id=531, as_frame=True)
906
+ X = df.data
907
+ y = df.target.astype(float)
908
+
909
+ # Train-test split
910
+ X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.5, random_state=42)
911
+
912
+ # Initialize the regressor, 8k context and 8-fold bagging gives best performance, reduce if running out of memory
913
+ regressor = SAP_RPT_OSS_Regressor(max_context_size=8192, bagging=8)
914
+
915
+ regressor.fit(X_train, y_train)
916
+
917
+ # Predict on the test set
918
+ predictions = regressor.predict(X_test)
919
+
920
+ r2 = r2_score(y_test, predictions)
921
+ print("R\xb2 Score:", r2)`]},sapiens:{prettyLabel:"sapiens",repoName:"sapiens",repoUrl:"https://github.com/facebookresearch/sapiens",filter:!1,countDownloads:'path_extension:"pt2" OR path_extension:"pth" OR path_extension:"onnx"'},seedvr:{prettyLabel:"SeedVR",repoName:"SeedVR",repoUrl:"https://github.com/ByteDance-Seed/SeedVR",filter:!1,countDownloads:'path_extension:"pth"'},"self-forcing":{prettyLabel:"SelfForcing",repoName:"SelfForcing",repoUrl:"https://github.com/guandeh17/Self-Forcing",filter:!1,countDownloads:'path_extension:"pt"'},"sentence-transformers":{prettyLabel:"sentence-transformers",repoName:"sentence-transformers",repoUrl:"https://github.com/UKPLab/sentence-transformers",docsUrl:"https://huggingface.co/docs/hub/sentence-transformers",snippets:e=>{let t=e.tags.includes(k)?", trust_remote_code=True":"";if(e.tags.includes("PyLate"))return[`from pylate import models
922
+
923
+ queries = [
924
+ "Which planet is known as the Red Planet?",
925
+ "What is the largest planet in our solar system?",
926
+ ]
927
+
928
+ documents = [
929
+ ["Mars is the Red Planet.", "Venus is Earth's twin."],
930
+ ["Jupiter is the largest planet.", "Saturn has rings."],
931
+ ]
932
+
933
+ model = models.ColBERT(model_name_or_path="${e.id}")
934
+
935
+ queries_emb = model.encode(queries, is_query=True)
936
+ docs_emb = model.encode(documents, is_query=False)`];if(e.tags.includes("cross-encoder")||"text-ranking"==e.pipeline_tag)return[`from sentence_transformers import CrossEncoder
937
+
938
+ model = CrossEncoder("${e.id}"${t})
939
+
940
+ query = "Which planet is known as the Red Planet?"
941
+ passages = [
942
+ "Venus is often called Earth's twin because of its similar size and proximity.",
943
+ "Mars, known for its reddish appearance, is often referred to as the Red Planet.",
944
+ "Jupiter, the largest planet in our solar system, has a prominent red spot.",
945
+ "Saturn, famous for its rings, is sometimes mistaken for the Red Planet."
946
+ ]
947
+
948
+ scores = model.predict([(query, passage) for passage in passages])
949
+ print(scores)`];let i=function(e){let t=e.widgetData?.[0];if(t?.source_sentence&&t?.sentences?.length)return[t.source_sentence,...t.sentences]}(e)??["The weather is lovely today.","It's so sunny outside!","He drove to the stadium."];return[`from sentence_transformers import SentenceTransformer
950
+
951
+ model = SentenceTransformer("${e.id}"${t})
952
+
953
+ sentences = ${JSON.stringify(i,null,4)}
954
+ embeddings = model.encode(sentences)
955
+
956
+ similarities = model.similarity(embeddings, embeddings)
957
+ print(similarities.shape)
958
+ # [${i.length}, ${i.length}]`]},filter:!0},setfit:{prettyLabel:"setfit",repoName:"setfit",repoUrl:"https://github.com/huggingface/setfit",docsUrl:"https://huggingface.co/docs/hub/setfit",snippets:e=>[`from setfit import SetFitModel
959
+
960
+ model = SetFitModel.from_pretrained("${e.id}")`],filter:!0},sklearn:{prettyLabel:"Scikit-learn",repoName:"Scikit-learn",repoUrl:"https://github.com/scikit-learn/scikit-learn",snippets:e=>{if(e.tags.includes("skops")){let t=e.config?.sklearn?.model?.file,i=e.config?.sklearn?.model_format;if(!t)return["# ⚠️ Model filename not specified in config.json"];if("pickle"===i)return[`import joblib
961
+ from skops.hub_utils import download
962
+ download("${e.id}", "path_to_folder")
963
+ model = joblib.load(
964
+ "${t}"
965
+ )
966
+ # only load pickle files from sources you trust
967
+ # read more about it here https://skops.readthedocs.io/en/stable/persistence.html`];return[`from skops.hub_utils import download
968
+ from skops.io import load
969
+ download("${e.id}", "path_to_folder")
970
+ # make sure model file is in skops format
971
+ # if model is a pickle file, make sure it's from a source you trust
972
+ model = load("path_to_folder/${t}")`]}return[`from huggingface_hub import hf_hub_download
973
+ import joblib
974
+ model = joblib.load(
975
+ hf_hub_download("${e.id}", "sklearn_model.joblib")
976
+ )
977
+ # only load pickle files from sources you trust
978
+ # read more about it here https://skops.readthedocs.io/en/stable/persistence.html`]},filter:!0,countDownloads:'path:"sklearn_model.joblib"'},spacy:{prettyLabel:"spaCy",repoName:"spaCy",repoUrl:"https://github.com/explosion/spaCy",docsUrl:"https://huggingface.co/docs/hub/spacy",snippets:e=>[`!pip install https://huggingface.co/${e.id}/resolve/main/${B(e.id)}-any-py3-none-any.whl
979
+
980
+ # Using spacy.load().
981
+ import spacy
982
+ nlp = spacy.load("${B(e.id)}")
983
+
984
+ # Importing as module.
985
+ import ${B(e.id)}
986
+ nlp = ${B(e.id)}.load()`],filter:!0,countDownloads:'path_extension:"whl"'},"span-marker":{prettyLabel:"SpanMarker",repoName:"SpanMarkerNER",repoUrl:"https://github.com/tomaarsen/SpanMarkerNER",docsUrl:"https://huggingface.co/docs/hub/span_marker",snippets:e=>[`from span_marker import SpanMarkerModel
987
+
988
+ model = SpanMarkerModel.from_pretrained("${e.id}")`],filter:!0},speechbrain:{prettyLabel:"speechbrain",repoName:"speechbrain",repoUrl:"https://github.com/speechbrain/speechbrain",docsUrl:"https://huggingface.co/docs/hub/speechbrain",snippets:e=>{let t=e.config?.speechbrain?.speechbrain_interface;if(void 0===t)return["# interface not specified in config.json"];let i=(e=>{switch(e){case"EncoderClassifier":return"classify_file";case"EncoderDecoderASR":case"EncoderASR":return"transcribe_file";case"SpectralMaskEnhancement":return"enhance_file";case"SepformerSeparation":return"separate_file";default:return}})(t);return void 0===i?["# interface in config.json invalid"]:[`from speechbrain.pretrained import ${t}
989
+ model = ${t}.from_hparams(
990
+ "${e.id}"
991
+ )
992
+ model.${i}("file.wav")`]},filter:!0,countDownloads:'path:"hyperparams.yaml"'},"ssr-speech":{prettyLabel:"SSR-Speech",repoName:"SSR-Speech",repoUrl:"https://github.com/WangHelin1997/SSR-Speech",filter:!1,countDownloads:'path_extension:".pth"'},"stable-audio-tools":{prettyLabel:"Stable Audio Tools",repoName:"stable-audio-tools",repoUrl:"https://github.com/Stability-AI/stable-audio-tools.git",filter:!1,countDownloads:'path:"model.safetensors"',snippets:e=>[`import torch
993
+ import torchaudio
994
+ from einops import rearrange
995
+ from stable_audio_tools import get_pretrained_model
996
+ from stable_audio_tools.inference.generation import generate_diffusion_cond
997
+
998
+ device = "cuda" if torch.cuda.is_available() else "cpu"
999
+
1000
+ # Download model
1001
+ model, model_config = get_pretrained_model("${e.id}")
1002
+ sample_rate = model_config["sample_rate"]
1003
+ sample_size = model_config["sample_size"]
1004
+
1005
+ model = model.to(device)
1006
+
1007
+ # Set up text and timing conditioning
1008
+ conditioning = [{
1009
+ "prompt": "128 BPM tech house drum loop",
1010
+ }]
1011
+
1012
+ # Generate stereo audio
1013
+ output = generate_diffusion_cond(
1014
+ model,
1015
+ conditioning=conditioning,
1016
+ sample_size=sample_size,
1017
+ device=device
1018
+ )
1019
+
1020
+ # Rearrange audio batch to a single sequence
1021
+ output = rearrange(output, "b d n -> d (b n)")
1022
+
1023
+ # Peak normalize, clip, convert to int16, and save to file
1024
+ output = output.to(torch.float32).div(torch.max(torch.abs(output))).clamp(-1, 1).mul(32767).to(torch.int16).cpu()
1025
+ torchaudio.save("output.wav", output, sample_rate)`]},monkeyocr:{prettyLabel:"MonkeyOCR",repoName:"monkeyocr",repoUrl:"https://github.com/Yuliang-Liu/MonkeyOCR",filter:!1,countDownloads:'path:"Recognition/config.json"'},"diffusion-single-file":{prettyLabel:"Diffusion Single File",repoName:"diffusion-single-file",repoUrl:"https://github.com/comfyanonymous/ComfyUI",filter:!1,countDownloads:'path_extension:"safetensors"'},"seed-story":{prettyLabel:"SEED-Story",repoName:"SEED-Story",repoUrl:"https://github.com/TencentARC/SEED-Story",filter:!1,countDownloads:'path:"cvlm_llama2_tokenizer/tokenizer.model"',snippets:()=>[`# seed_story_cfg_path refers to 'https://github.com/TencentARC/SEED-Story/blob/master/configs/clm_models/agent_7b_sft.yaml'
1026
+ # llm_cfg_path refers to 'https://github.com/TencentARC/SEED-Story/blob/master/configs/clm_models/llama2chat7b_lora.yaml'
1027
+ from omegaconf import OmegaConf
1028
+ import hydra
1029
+
1030
+ # load Llama2
1031
+ llm_cfg = OmegaConf.load(llm_cfg_path)
1032
+ llm = hydra.utils.instantiate(llm_cfg, torch_dtype="fp16")
1033
+
1034
+ # initialize seed_story
1035
+ seed_story_cfg = OmegaConf.load(seed_story_cfg_path)
1036
+ seed_story = hydra.utils.instantiate(seed_story_cfg, llm=llm) `]},soloaudio:{prettyLabel:"SoloAudio",repoName:"SoloAudio",repoUrl:"https://github.com/WangHelin1997/SoloAudio",filter:!1,countDownloads:'path:"soloaudio_v2.pt"'},songbloom:{prettyLabel:"SongBloom",repoName:"SongBloom",repoUrl:"https://github.com/Cypress-Yang/SongBloom",filter:!1,countDownloads:'path_extension:"pt"'},"stable-baselines3":{prettyLabel:"stable-baselines3",repoName:"stable-baselines3",repoUrl:"https://github.com/huggingface/huggingface_sb3",docsUrl:"https://huggingface.co/docs/hub/stable-baselines3",snippets:e=>[`from huggingface_sb3 import load_from_hub
1037
+ checkpoint = load_from_hub(
1038
+ repo_id="${e.id}",
1039
+ filename="{MODEL FILENAME}.zip",
1040
+ )`],filter:!0,countDownloads:'path_extension:"zip"'},stanza:{prettyLabel:"Stanza",repoName:"stanza",repoUrl:"https://github.com/stanfordnlp/stanza",docsUrl:"https://huggingface.co/docs/hub/stanza",snippets:e=>[`import stanza
1041
+
1042
+ stanza.download("${B(e.id).replace("stanza-","")}")
1043
+ nlp = stanza.Pipeline("${B(e.id).replace("stanza-","")}")`],filter:!0,countDownloads:'path:"models/default.zip"'},supertonic:{prettyLabel:"Supertonic",repoName:"Supertonic",repoUrl:"https://github.com/supertone-inc/supertonic",snippets:e=>[`from supertonic import TTS
1044
+
1045
+ tts = TTS(auto_download=True)
1046
+
1047
+ style = tts.get_voice_style(voice_name="M1")
1048
+
1049
+ text = "The train delay was announced at 4:45 PM on Wed, Apr 3, 2024 due to track maintenance."
1050
+ wav, duration = tts.synthesize(text, voice_style=style)
1051
+
1052
+ tts.save_audio(wav, "output.wav")`],filter:!1},swarmformer:{prettyLabel:"SwarmFormer",repoName:"SwarmFormer",repoUrl:"https://github.com/takara-ai/SwarmFormer",snippets:e=>[`from swarmformer import SwarmFormerModel
1053
+
1054
+ model = SwarmFormerModel.from_pretrained("${e.id}")
1055
+ `],filter:!1},"f5-tts":{prettyLabel:"F5-TTS",repoName:"F5-TTS",repoUrl:"https://github.com/SWivid/F5-TTS",filter:!1,countDownloads:'path_extension:"safetensors" OR path_extension:"pt"'},genmo:{prettyLabel:"Genmo",repoName:"Genmo",repoUrl:"https://github.com/genmoai/models",filter:!1,countDownloads:'path:"vae_stats.json"'},"tencent-song-generation":{prettyLabel:"SongGeneration",repoName:"SongGeneration",repoUrl:"https://github.com/tencent-ailab/songgeneration",filter:!1,countDownloads:'path:"ckpt/songgeneration_base/model.pt"'},tensorflowtts:{prettyLabel:"TensorFlowTTS",repoName:"TensorFlowTTS",repoUrl:"https://github.com/TensorSpeech/TensorFlowTTS",snippets:e=>{if(e.tags.includes("text-to-mel"))return[`from tensorflow_tts.inference import AutoProcessor, TFAutoModel
1056
+
1057
+ processor = AutoProcessor.from_pretrained("${e.id}")
1058
+ model = TFAutoModel.from_pretrained("${e.id}")
1059
+ `];if(e.tags.includes("mel-to-wav"))return[`from tensorflow_tts.inference import TFAutoModel
1060
+
1061
+ model = TFAutoModel.from_pretrained("${e.id}")
1062
+ audios = model.inference(mels)
1063
+ `];return[`from tensorflow_tts.inference import TFAutoModel
1064
+
1065
+ model = TFAutoModel.from_pretrained("${e.id}")
1066
+ `]}},tensorrt:{prettyLabel:"TensorRT",repoName:"TensorRT",repoUrl:"https://github.com/NVIDIA/TensorRT",countDownloads:'path_extension:"onnx"'},tabpfn:{prettyLabel:"TabPFN",repoName:"TabPFN",repoUrl:"https://github.com/PriorLabs/TabPFN"},terratorch:{prettyLabel:"TerraTorch",repoName:"TerraTorch",repoUrl:"https://github.com/IBM/terratorch",docsUrl:"https://ibm.github.io/terratorch/",filter:!1,countDownloads:'path_extension:"pt" OR path_extension:"ckpt"',snippets:e=>[`from terratorch.registry import BACKBONE_REGISTRY
1067
+
1068
+ model = BACKBONE_REGISTRY.build("${e.id}")`]},"tic-clip":{prettyLabel:"TiC-CLIP",repoName:"TiC-CLIP",repoUrl:"https://github.com/apple/ml-tic-clip",filter:!1,countDownloads:'path_extension:"pt" AND path_prefix:"checkpoints/"'},timesfm:{prettyLabel:"TimesFM",repoName:"timesfm",repoUrl:"https://github.com/google-research/timesfm",filter:!1,countDownloads:'path:"checkpoints/checkpoint_1100000/state/checkpoint" OR path:"checkpoints/checkpoint_2150000/state/checkpoint" OR path_extension:"ckpt"'},timm:{prettyLabel:"timm",repoName:"pytorch-image-models",repoUrl:"https://github.com/rwightman/pytorch-image-models",docsUrl:"https://huggingface.co/docs/hub/timm",snippets:e=>[`import timm
1069
+
1070
+ model = timm.create_model("hf_hub:${e.id}", pretrained=True)`],filter:!0,countDownloads:'path:"pytorch_model.bin" OR path:"model.safetensors"'},tirex:{prettyLabel:"TiRex",repoName:"TiRex",repoUrl:"https://github.com/NX-AI/tirex",countDownloads:'path_extension:"ckpt"'},torchgeo:{prettyLabel:"TorchGeo",repoName:"TorchGeo",repoUrl:"https://github.com/microsoft/torchgeo",docsUrl:"https://torchgeo.readthedocs.io/",filter:!1,countDownloads:'path_extension:"pt" OR path_extension:"pth"'},transformers:{prettyLabel:"Transformers",repoName:"\uD83E\uDD17/transformers",repoUrl:"https://github.com/huggingface/transformers",docsUrl:"https://huggingface.co/docs/hub/transformers",snippets:U,filter:!0},"transformers.js":{prettyLabel:"Transformers.js",repoName:"transformers.js",repoUrl:"https://github.com/huggingface/transformers.js",docsUrl:"https://huggingface.co/docs/hub/transformers-js",snippets:e=>{if(!e.pipeline_tag)return["// ⚠️ Unknown pipeline tag"];let t="@huggingface/transformers";return[`// npm i ${t}
1071
+ import { pipeline } from '${t}';
1072
+
1073
+ // Allocate pipeline
1074
+ const pipe = await pipeline('${e.pipeline_tag}', '${e.id}');`]},filter:!0},trellis:{prettyLabel:"Trellis",repoName:"Trellis",repoUrl:"https://github.com/microsoft/TRELLIS",countDownloads:'path_extension:"safetensors"'},ultralytics:{prettyLabel:"ultralytics",repoName:"ultralytics",repoUrl:"https://github.com/ultralytics/ultralytics",docsUrl:"https://github.com/ultralytics/ultralytics",filter:!1,countDownloads:'path_extension:"pt"',snippets:$},univa:{prettyLabel:"univa",repoName:"univa",repoUrl:"https://github.com/PKU-YuanGroup/UniWorld-V1",snippets:e=>[`# Follow installation instructions at https://github.com/PKU-YuanGroup/UniWorld-V1
1075
+
1076
+ from univa.models.qwen2p5vl.modeling_univa_qwen2p5vl import UnivaQwen2p5VLForConditionalGeneration
1077
+ model = UnivaQwen2p5VLForConditionalGeneration.from_pretrained(
1078
+ "${e.id}",
1079
+ torch_dtype=torch.bfloat16,
1080
+ attn_implementation="flash_attention_2",
1081
+ ).to("cuda")
1082
+ processor = AutoProcessor.from_pretrained("${e.id}")
1083
+ `],filter:!0,countDownloads:'path:"config.json"'},"uni-3dar":{prettyLabel:"Uni-3DAR",repoName:"Uni-3DAR",repoUrl:"https://github.com/dptech-corp/Uni-3DAR",docsUrl:"https://github.com/dptech-corp/Uni-3DAR",countDownloads:'path_extension:"pt"'},"unity-sentis":{prettyLabel:"unity-sentis",repoName:"unity-sentis",repoUrl:"https://github.com/Unity-Technologies/sentis-samples",snippets:()=>[`string modelName = "[Your model name here].sentis";
1084
+ Model model = ModelLoader.Load(Application.streamingAssetsPath + "/" + modelName);
1085
+ IWorker engine = WorkerFactory.CreateWorker(BackendType.GPUCompute, model);
1086
+ // Please see provided C# file for more details
1087
+ `],filter:!0,countDownloads:'path_extension:"sentis"'},sana:{prettyLabel:"Sana",repoName:"Sana",repoUrl:"https://github.com/NVlabs/Sana",countDownloads:'path_extension:"pth"',snippets:e=>[`
1088
+ # Load the model and infer image from text
1089
+ import torch
1090
+ from app.sana_pipeline import SanaPipeline
1091
+ from torchvision.utils import save_image
1092
+
1093
+ sana = SanaPipeline("configs/sana_config/1024ms/Sana_1600M_img1024.yaml")
1094
+ sana.from_pretrained("hf://${e.id}")
1095
+
1096
+ image = sana(
1097
+ prompt='a cyberpunk cat with a neon sign that says "Sana"',
1098
+ height=1024,
1099
+ width=1024,
1100
+ guidance_scale=5.0,
1101
+ pag_guidance_scale=2.0,
1102
+ num_inference_steps=18,
1103
+ ) `]},videoprism:{prettyLabel:"VideoPrism",repoName:"VideoPrism",repoUrl:"https://github.com/google-deepmind/videoprism",countDownloads:'path_extension:"npz"',snippets:e=>[`# Install from https://github.com/google-deepmind/videoprism
1104
+ import jax
1105
+ from videoprism import models as vp
1106
+
1107
+ flax_model = vp.get_model("${e.id}")
1108
+ loaded_state = vp.load_pretrained_weights("${e.id}")
1109
+
1110
+ @jax.jit
1111
+ def forward_fn(inputs, train=False):
1112
+ return flax_model.apply(loaded_state, inputs, train=train)`]},"vfi-mamba":{prettyLabel:"VFIMamba",repoName:"VFIMamba",repoUrl:"https://github.com/MCG-NJU/VFIMamba",countDownloads:'path_extension:"pkl"',snippets:e=>[`from Trainer_finetune import Model
1113
+
1114
+ model = Model.from_pretrained("${e.id}")`]},lvface:{prettyLabel:"LVFace",repoName:"LVFace",repoUrl:"https://github.com/bytedance/LVFace",countDownloads:'path_extension:"pt" OR path_extension:"onnx"',snippets:e=>[`from huggingface_hub import hf_hub_download
1115
+ from inference_onnx import LVFaceONNXInferencer
1116
+
1117
+ model_path = hf_hub_download("${e.id}", "LVFace-L_Glint360K/LVFace-L_Glint360K.onnx")
1118
+ inferencer = LVFaceONNXInferencer(model_path, use_gpu=True, timeout=300)
1119
+ img_path = 'path/to/image1.jpg'
1120
+ embedding = inferencer.infer_from_image(img_path)`]},voicecraft:{prettyLabel:"VoiceCraft",repoName:"VoiceCraft",repoUrl:"https://github.com/jasonppy/VoiceCraft",docsUrl:"https://github.com/jasonppy/VoiceCraft",snippets:e=>[`from voicecraft import VoiceCraft
1121
+
1122
+ model = VoiceCraft.from_pretrained("${e.id}")`]},voxcpm:{prettyLabel:"VoxCPM",repoName:"VoxCPM",repoUrl:"https://github.com/OpenBMB/VoxCPM",snippets:e=>[`import soundfile as sf
1123
+ from voxcpm import VoxCPM
1124
+
1125
+ model = VoxCPM.from_pretrained("${e.id}")
1126
+
1127
+ wav = model.generate(
1128
+ text="VoxCPM is an innovative end-to-end TTS model from ModelBest, designed to generate highly expressive speech.",
1129
+ prompt_wav_path=None, # optional: path to a prompt speech for voice cloning
1130
+ prompt_text=None, # optional: reference text
1131
+ cfg_value=2.0, # LM guidance on LocDiT, higher for better adherence to the prompt, but maybe worse
1132
+ inference_timesteps=10, # LocDiT inference timesteps, higher for better result, lower for fast speed
1133
+ normalize=True, # enable external TN tool
1134
+ denoise=True, # enable external Denoise tool
1135
+ retry_badcase=True, # enable retrying mode for some bad cases (unstoppable)
1136
+ retry_badcase_max_times=3, # maximum retrying times
1137
+ retry_badcase_ratio_threshold=6.0, # maximum length restriction for bad case detection (simple but effective), it could be adjusted for slow pace speech
1138
+ )
1139
+
1140
+ sf.write("output.wav", wav, 16000)
1141
+ print("saved: output.wav")`],filter:!1},vui:{prettyLabel:"Vui",repoName:"Vui",repoUrl:"https://github.com/vui-ai/vui",countDownloads:'path_extension:"pt"',snippets:()=>[`# !pip install git+https://github.com/fluxions-ai/vui
1142
+
1143
+ import torchaudio
1144
+
1145
+ from vui.inference import render
1146
+ from vui.model import Vui,
1147
+
1148
+ model = Vui.from_pretrained().cuda()
1149
+ waveform = render(
1150
+ model,
1151
+ "Hey, here is some random stuff, usually something quite long as the shorter the text the less likely the model can cope!",
1152
+ )
1153
+ print(waveform.shape)
1154
+ torchaudio.save("out.opus", waveform[0], 22050)
1155
+ `]},vibevoice:{prettyLabel:"VibeVoice",repoName:"VibeVoice",repoUrl:"https://github.com/microsoft/VibeVoice",snippets:e=>[`import torch, soundfile as sf, librosa, numpy as np
1156
+ from vibevoice.processor.vibevoice_processor import VibeVoiceProcessor
1157
+ from vibevoice.modular.modeling_vibevoice_inference import VibeVoiceForConditionalGenerationInference
1158
+
1159
+ # Load voice sample (should be 24kHz mono)
1160
+ voice, sr = sf.read("path/to/voice_sample.wav")
1161
+ if voice.ndim > 1: voice = voice.mean(axis=1)
1162
+ if sr != 24000: voice = librosa.resample(voice, sr, 24000)
1163
+
1164
+ processor = VibeVoiceProcessor.from_pretrained("${e.id}")
1165
+ model = VibeVoiceForConditionalGenerationInference.from_pretrained(
1166
+ "${e.id}", torch_dtype=torch.bfloat16
1167
+ ).to("cuda").eval()
1168
+ model.set_ddpm_inference_steps(5)
1169
+
1170
+ inputs = processor(text=["Speaker 0: Hello!\\nSpeaker 1: Hi there!"],
1171
+ voice_samples=[[voice]], return_tensors="pt")
1172
+ audio = model.generate(**inputs, cfg_scale=1.3,
1173
+ tokenizer=processor.tokenizer).speech_outputs[0]
1174
+ sf.write("output.wav", audio.cpu().numpy().squeeze(), 24000)`],filter:!1},"wan2.2":{prettyLabel:"Wan2.2",repoName:"Wan2.2",repoUrl:"https://github.com/Wan-Video/Wan2.2",countDownloads:'path_filename:"config" AND path_extension:"json"'},wham:{prettyLabel:"WHAM",repoName:"wham",repoUrl:"https://huggingface.co/microsoft/wham",docsUrl:"https://huggingface.co/microsoft/wham/blob/main/README.md",countDownloads:'path_extension:"ckpt"'},whisperkit:{prettyLabel:"WhisperKit",repoName:"WhisperKit",repoUrl:"https://github.com/argmaxinc/WhisperKit",docsUrl:"https://github.com/argmaxinc/WhisperKit?tab=readme-ov-file#homebrew",snippets:()=>[`# Install CLI with Homebrew on macOS device
1175
+ brew install whisperkit-cli
1176
+
1177
+ # View all available inference options
1178
+ whisperkit-cli transcribe --help
1179
+
1180
+ # Download and run inference using whisper base model
1181
+ whisperkit-cli transcribe --audio-path /path/to/audio.mp3
1182
+
1183
+ # Or use your preferred model variant
1184
+ whisperkit-cli transcribe --model "large-v3" --model-prefix "distil" --audio-path /path/to/audio.mp3 --verbose`],countDownloads:'path_filename:"model" AND path_extension:"mil" AND _exists_:"path_prefix"'},yolov10:{prettyLabel:"YOLOv10",repoName:"YOLOv10",repoUrl:"https://github.com/THU-MIG/yolov10",docsUrl:"https://github.com/THU-MIG/yolov10",countDownloads:'path_extension:"pt" OR path_extension:"safetensors"',snippets:$},zonos:{prettyLabel:"Zonos",repoName:"Zonos",repoUrl:"https://github.com/Zyphra/Zonos",docsUrl:"https://github.com/Zyphra/Zonos",snippets:e=>[`# pip install git+https://github.com/Zyphra/Zonos.git
1185
+ import torchaudio
1186
+ from zonos.model import Zonos
1187
+ from zonos.conditioning import make_cond_dict
1188
+
1189
+ model = Zonos.from_pretrained("${e.id}", device="cuda")
1190
+
1191
+ wav, sr = torchaudio.load("speaker.wav") # 5-10s reference clip
1192
+ speaker = model.make_speaker_embedding(wav, sr)
1193
+
1194
+ cond = make_cond_dict(text="Hello, world!", speaker=speaker, language="en-us")
1195
+ codes = model.generate(model.prepare_conditioning(cond))
1196
+
1197
+ audio = model.autoencoder.decode(codes)[0].cpu()
1198
+ torchaudio.save("sample.wav", audio, model.autoencoder.sampling_rate)
1199
+ `],filter:!1},"3dtopia-xl":{prettyLabel:"3DTopia-XL",repoName:"3DTopia-XL",repoUrl:"https://github.com/3DTopia/3DTopia-XL",filter:!1,countDownloads:'path:"model_vae_fp16.pt"',snippets:e=>[`from threedtopia_xl.models import threedtopia_xl
1200
+
1201
+ model = threedtopia_xl.from_pretrained("${e.id}")
1202
+ model.generate(cond="path/to/image.png")`]}};Object.keys(Q),Object.entries(Q).filter(([e,t])=>t.filter).map(([e])=>e),(j=z||(z={}))[j.F32=0]="F32",j[j.F16=1]="F16",j[j.Q4_0=2]="Q4_0",j[j.Q4_1=3]="Q4_1",j[j.Q4_1_SOME_F16=4]="Q4_1_SOME_F16",j[j.Q4_2=5]="Q4_2",j[j.Q4_3=6]="Q4_3",j[j.Q8_0=7]="Q8_0",j[j.Q5_0=8]="Q5_0",j[j.Q5_1=9]="Q5_1",j[j.Q2_K=10]="Q2_K",j[j.Q3_K_S=11]="Q3_K_S",j[j.Q3_K_M=12]="Q3_K_M",j[j.Q3_K_L=13]="Q3_K_L",j[j.Q4_K_S=14]="Q4_K_S",j[j.Q4_K_M=15]="Q4_K_M",j[j.Q5_K_S=16]="Q5_K_S",j[j.Q5_K_M=17]="Q5_K_M",j[j.Q6_K=18]="Q6_K",j[j.IQ2_XXS=19]="IQ2_XXS",j[j.IQ2_XS=20]="IQ2_XS",j[j.Q2_K_S=21]="Q2_K_S",j[j.IQ3_XS=22]="IQ3_XS",j[j.IQ3_XXS=23]="IQ3_XXS",j[j.IQ1_S=24]="IQ1_S",j[j.IQ4_NL=25]="IQ4_NL",j[j.IQ3_S=26]="IQ3_S",j[j.IQ3_M=27]="IQ3_M",j[j.IQ2_S=28]="IQ2_S",j[j.IQ2_M=29]="IQ2_M",j[j.IQ4_XS=30]="IQ4_XS",j[j.IQ1_M=31]="IQ1_M",j[j.BF16=32]="BF16",j[j.Q4_0_4_4=33]="Q4_0_4_4",j[j.Q4_0_4_8=34]="Q4_0_4_8",j[j.Q4_0_8_8=35]="Q4_0_8_8",j[j.TQ1_0=36]="TQ1_0",j[j.TQ2_0=37]="TQ2_0",j[j.MXFP4_MOE=38]="MXFP4_MOE",j[j.Q2_K_XL=1e3]="Q2_K_XL",j[j.Q3_K_XL=1001]="Q3_K_XL",j[j.Q4_K_XL=1002]="Q4_K_XL",j[j.Q5_K_XL=1003]="Q5_K_XL",j[j.Q6_K_XL=1004]="Q6_K_XL",j[j.Q8_K_XL=1005]="Q8_K_XL";let O=Object.values(z).filter(e=>"string"==typeof e);RegExp(RegExp(`(?<quant>${O.join("|")})(_(?<sizeVariation>[A-Z]+))?`),"g"),z.F32,z.BF16,z.F16,z.Q8_K_XL,z.Q8_0,z.Q6_K_XL,z.Q6_K,z.Q5_K_XL,z.Q5_K_M,z.Q5_K_S,z.Q5_0,z.Q5_1,z.Q4_K_XL,z.Q4_K_M,z.Q4_K_S,z.IQ4_NL,z.IQ4_XS,z.Q4_0_4_4,z.Q4_0_4_8,z.Q4_0_8_8,z.Q4_1_SOME_F16,z.Q4_0,z.Q4_1,z.Q4_2,z.Q4_3,z.MXFP4_MOE,z.Q3_K_XL,z.Q3_K_L,z.Q3_K_M,z.Q3_K_S,z.IQ3_M,z.IQ3_S,z.IQ3_XS,z.IQ3_XXS,z.Q2_K_XL,z.Q2_K,z.Q2_K_S,z.IQ2_M,z.IQ2_S,z.IQ2_XS,z.IQ2_XXS,z.IQ1_S,z.IQ1_M,z.TQ1_0,z.TQ2_0,(V=q||(q={}))[V.F32=0]="F32",V[V.F16=1]="F16",V[V.Q4_0=2]="Q4_0",V[V.Q4_1=3]="Q4_1",V[V.Q5_0=6]="Q5_0",V[V.Q5_1=7]="Q5_1",V[V.Q8_0=8]="Q8_0",V[V.Q8_1=9]="Q8_1",V[V.Q2_K=10]="Q2_K",V[V.Q3_K=11]="Q3_K",V[V.Q4_K=12]="Q4_K",V[V.Q5_K=13]="Q5_K",V[V.Q6_K=14]="Q6_K",V[V.Q8_K=15]="Q8_K",V[V.IQ2_XXS=16]="IQ2_XXS",V[V.IQ2_XS=17]="IQ2_XS",V[V.IQ3_XXS=18]="IQ3_XXS",V[V.IQ1_S=19]="IQ1_S",V[V.IQ4_NL=20]="IQ4_NL",V[V.IQ3_S=21]="IQ3_S",V[V.IQ2_S=22]="IQ2_S",V[V.IQ4_XS=23]="IQ4_XS",V[V.I8=24]="I8",V[V.I16=25]="I16",V[V.I32=26]="I32",V[V.I64=27]="I64",V[V.F64=28]="F64",V[V.IQ1_M=29]="IQ1_M",V[V.BF16=30]="BF16",V[V.TQ1_0=34]="TQ1_0",V[V.TQ2_0=35]="TQ2_0",V[V.MXFP4=39]="MXFP4";var j,V,z,q,G,K=((G=K||{})[G.UINT8=0]="UINT8",G[G.INT8=1]="INT8",G[G.UINT16=2]="UINT16",G[G.INT16=3]="INT16",G[G.UINT32=4]="UINT32",G[G.INT32=5]="INT32",G[G.FLOAT32=6]="FLOAT32",G[G.BOOL=7]="BOOL",G[G.STRING=8]="STRING",G[G.ARRAY=9]="ARRAY",G[G.UINT64=10]="UINT64",G[G.INT64=11]="INT64",G[G.FLOAT64=12]="FLOAT64",G),H="u">typeof window&&void 0!==window.document,X="object"==typeof self&&self.constructor&&"DedicatedWorkerGlobalScope"===self.constructor.name,W=!H&&!X;q.F32,q.F16,q.Q8_0,q.Q8_1,q.Q8_K,q.Q6_K,q.Q5_0,q.Q5_1,q.Q5_K,q.Q4_0,q.Q4_1,q.Q4_K,q.Q3_K,q.Q2_K,q.IQ4_XS,q.IQ3_S,q.IQ3_XXS,q.IQ2_S,q.IQ2_XS,q.IQ2_XXS,q.IQ1_S,q.IQ4_NL,q.I8,q.I16,q.I32,q.I64,q.F64,q.IQ1_M,q.BF16,q.TQ1_0,q.TQ2_0,q.MXFP4,q.F32,q.F16,q.Q4_0,q.Q4_1,q.Q5_0,q.Q5_1,q.Q8_0,q.Q8_1,q.Q2_K,q.Q3_K,q.Q4_K,q.Q5_K,q.Q6_K,q.Q8_K,q.IQ2_XXS,q.IQ2_XS,q.IQ3_XXS,q.IQ1_S,q.IQ4_NL,q.IQ3_S,q.IQ2_S,q.IQ4_XS,q.I8,q.I16,q.I32,q.I64,q.F64,q.IQ1_M,q.BF16,q.TQ1_0,q.TQ2_0,q.MXFP4;var Y=new Uint8Array([71,71,85,70]);function J(e){return"string"==typeof K[e]}var Z=class{constructor(e,t){this.uri=e,this.params=t,this.chunk=0,this.buffer=new ArrayBuffer(0,{maxByteLength:5e7}),this.dataView=new DataView(this.buffer)}chunk;buffer;dataView;get view(){return this.dataView}async fetchChunk(){let e=[2e6*this.chunk,(this.chunk+1)*2e6-1],t=new Uint8Array(await (await (this.params?.fetch??fetch)(this.uri,{headers:{...this.params?.additionalFetchHeaders??{},Range:`bytes=${e[0]}-${e[1]}`}})).arrayBuffer());this.appendBuffer(t),this.chunk+=1}appendBuffer(e){if(ArrayBuffer.prototype.resize)this.buffer.resize((this.chunk+1)*2e6),new Uint8Array(this.buffer).set(e,2e6*this.chunk);else{let t=new ArrayBuffer((this.chunk+1)*2e6,{maxByteLength:5e7}),i=new Uint8Array(t);i.set(new Uint8Array(this.buffer)),i.set(e,2e6*this.chunk),this.buffer=t,this.dataView=new DataView(this.buffer)}}async fetchChunkIfNeeded(e){this.dataView.byteLength-e<5e5&&await this.fetchChunk()}},ee=class extends Z{async fetchChunk(){let{FileBlob:e}=await i.e(1759).then(i.bind(i,22658)),t=await e.create(this.uri),o=[2e6*this.chunk,(this.chunk+1)*2e6-1],a=await t.slice(o[0],o[1]).arrayBuffer();this.appendBuffer(new Uint8Array(a)),this.chunk+=1}};function et(e,t,i,o){switch(i){case 1:return{value:BigInt(e.getUint32(t,o)),length:4};case 2:case 3:return{value:e.getBigUint64(t,o),length:8}}}function ei(e,t,i,o){let a=et(e,t,i,o),n=a.length;return{value:new TextDecoder().decode(e.buffer.slice(t+n,t+n+Number(a.value))),length:n+Number(a.value)}}async function eo(e,t){let i,o,a;if(W)if(e.match(/^https?:\/\//))i=new Z(e,t);else if(t?.allowLocalFile)i=new ee(e,t);else throw Error("Access to local file is not enabled, please set allowLocalFile to true");else{if(t?.allowLocalFile)throw Error("allowLocalFile cannot be used on browser");i=new Z(e,t)}if(await i.fetchChunk(),!((e,t)=>{for(let i=0;i<t.length;i++)if(t[i]!==e[i])return!1;return!0})(new Uint8Array(i.view.buffer.slice(0,4)),Y))throw Error("not a valid gguf file: not starting with GGUF magic number");let[n,r]=65535&(a=i.view.getUint32(4,!0))?[!0,a]:[!1,i.view.getUint32(4,!1)];if(1!==r&&2!==r&&3!==r)throw Error(`not a valid gguf file: unsupported version "${r}"`);let s=8,u=et(i.view,s,r,n);s+=u.length;let l=et(i.view,s,r,n);s+=l.length;let d={version:r,tensor_count:u.value,kv_count:l.value};t?.typedMetadata&&(o={version:{value:r,type:4},tensor_count:{value:u.value,type:1===r?4:10},kv_count:{value:l.value,type:1===r?4:10}});for(let e=0;e<l.value;e++){let e;await i.fetchChunkIfNeeded(s);let t=ei(i.view,s,r,n);s+=t.length;let a=i.view.getUint32(s,n);if(s+=4,!J(a))throw Error("Unsupported metadata type: "+a);for(;!e;)try{e=function e(t,i,o,a,n){switch(i){case 0:return{value:t.getUint8(o),length:1};case 1:return{value:t.getInt8(o),length:1};case 2:return{value:t.getUint16(o,n),length:2};case 3:return{value:t.getInt16(o,n),length:2};case 4:return{value:t.getUint32(o,n),length:4};case 5:return{value:t.getInt32(o,n),length:4};case 6:return{value:t.getFloat32(o,n),length:4};case 7:return{value:0!==t.getUint8(o),length:1};case 8:return ei(t,o,a,n);case 9:{let i=t.getUint32(o,n),r=et(t,o+4,a,n),s=4+r.length,u=[];for(let l=0;l<r.value;l++){let r=e(t,i,o+s,a,n);u.push(r.value),s+=r.length}return{value:u,length:s}}case 10:return{value:t.getBigUint64(o,n),length:8};case 11:return{value:t.getBigInt64(o,n),length:8};case 12:return{value:t.getFloat64(o,n),length:8}}}(i.view,a,s,r,n)}catch(e){if(e instanceof RangeError)await i.fetchChunk();else throw e}if(s+=e.length,d[t.value]=e.value,o){let r={value:e.value,type:a};if(9===a){let t=s-e.length,o=i.view.getUint32(t,n);J(o)&&(r.subType=o)}o[t.value]=r}}let c=s,p=[];for(let e=0;e<u.value;e++){await i.fetchChunkIfNeeded(s);let e=ei(i.view,s,r,n);s+=e.length;let t=i.view.getUint32(s,n);s+=4;let o=[];for(let e=0;e<t;e++){let e=et(i.view,s,r,n);o.push(e.value),s+=e.length}let a=i.view.getUint32(s,n);s+=4;let u=i.view.getBigUint64(s,n);s+=8,p.push({name:e.value,n_dims:t,shape:o,dtype:a,offset:u})}let m=Number(d["general.alignment"]??32),h=s,g=BigInt(s+m-1&~(m-1));if(t?.computeParametersCount&&t?.typedMetadata){let e=p.map(({shape:e})=>e.reduce((e,t)=>e*Number(t),1)).reduce((e,t)=>e+t,0);return{metadata:d,tensorInfos:p,tensorDataOffset:g,littleEndian:n,parameterCount:e,typedMetadata:o,tensorInfoByteRange:[c,h]}}if(t?.computeParametersCount){let e=p.map(({shape:e})=>e.reduce((e,t)=>e*Number(t),1)).reduce((e,t)=>e+t,0);return{metadata:d,tensorInfos:p,tensorDataOffset:g,littleEndian:n,parameterCount:e,tensorInfoByteRange:[c,h]}}return t?.typedMetadata?{metadata:d,tensorInfos:p,tensorDataOffset:g,littleEndian:n,typedMetadata:o,tensorInfoByteRange:[c,h]}:{metadata:d,tensorInfos:p,tensorDataOffset:g,littleEndian:n,tensorInfoByteRange:[c,h]}}},47680(e,t,i){i.d(t,{lF:()=>F});let o="null";function a(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}function n(e){if(null===e)return null;if("object"==typeof e&&null!==e&&"toJSON"in e&&"function"==typeof e.toJSON){let t=e.toJSON();if(t!==e)return n(t)}if("string"==typeof e||"boolean"==typeof e)return e;if("number"==typeof e)return Object.is(e,-0)?0:Number.isFinite(e)?e:null;if("bigint"==typeof e)return e>=Number.MIN_SAFE_INTEGER&&e<=Number.MAX_SAFE_INTEGER?Number(e):e.toString();if(e instanceof Date)return e.toISOString();if(Array.isArray(e))return e.map(n);if(e instanceof Set)return Array.from(e).map(n);if(e instanceof Map)return Object.fromEntries(Array.from(e,([e,t])=>[String(e),n(t)]));if(function(e){if(null===e||"object"!=typeof e)return!1;let t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}(e)){let t={};for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=n(e[i]));return t}return null}function r(e){return null===e||"string"==typeof e||"number"==typeof e||"boolean"==typeof e}function s(e){return Array.isArray(e)}function u(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function l(e){return 0===Object.keys(e).length}function d(e){return 0===e.length||e.every(e=>r(e))}function c(e){return 0===e.length||e.every(e=>u(e))}function p(e,t){return null===e?o:"boolean"==typeof e||"number"==typeof e?String(e):function(e,t=","){return!function(e,t=","){var i;if(!e||e!==e.trim())return!1;return!("true"===e||"false"===e||e===o||(i=e,/^-?\d+(?:\.\d+)?(?:e[+-]?\d+)?$/i.test(i)||/^0\d+$/.test(i))||e.includes(":")||e.includes('"')||e.includes("\\")||/[[\]{}]/.test(e)||/[\n\r\t]/.test(e)||e.includes(t)||e.startsWith("-"))}(e,t)?`"${a(e)}"`:e}(e,t)}function m(e){return/^[A-Z_][\w.]*$/i.test(e)?e:`"${a(e)}"`}function h(e,t=","){return e.map(e=>p(e,t)).join(t)}function g(e,t){let i=t?.key,o=t?.fields,a=t?.delimiter??",",n="";if(i&&(n+=m(i)),n+=`[${e}${","!==a?a:""}]`,o){let e=o.map(e=>m(e));n+=`{${e.join(a)}}`}return n+":"}function*f(e,t,i,o,a,n){let d=Object.keys(e);0!==t||o||(o=new Set(d.filter(e=>e.includes("."))));let c=n??i.flattenDepth;for(let[n,h]of Object.entries(e))yield*function*(e,t,i,o,a,n,d,c){let h=d?`${d}.${e}`:e,g=c??o.flattenDepth;if("safe"===o.keyFolding&&a){let c=function(e,t,i,o,a,n,r){if("safe"!==o.keyFolding||!u(t))return;let{segments:s,tail:d,leafValue:c}=function(e,t,i){let o=[e],a=t;for(;o.length<i&&u(a);){let e=Object.keys(a);if(1!==e.length)break;let t=e[0],i=a[t];o.push(t),a=i}return!u(a)||l(a)?{segments:o,tail:void 0,leafValue:a}:{segments:o,tail:a,leafValue:a}}(e,t,r??o.flattenDepth);if(s.length<2||!s.every(e=>/^[A-Z_]\w*$/i.test(e)))return;let p=s.join("."),m=n?`${n}.${p}`:p;if(!i.includes(p)&&!(a&&a.has(m)))return{foldedKey:p,remainder:d,leafValue:c,segmentCount:s.length}}(e,t,a,o,n,d,g);if(c){let{foldedKey:e,remainder:t,leafValue:a,segmentCount:h}=c,b=m(e);if(void 0===t){if(r(a))return void(yield v(i,`${b}: ${p(a,o.delimiter)}`,o.indent));else if(s(a))return void(yield*D(e,a,i,o));else if(u(a)&&l(a))return void(yield v(i,`${b}:`,o.indent))}if(u(t)){yield v(i,`${b}:`,o.indent);let a=d?`${d}.${e}`:e;yield*f(t,i+1,o,n,a,g-h);return}}}let b=m(e);r(t)?yield v(i,`${b}: ${p(t,o.delimiter)}`,o.indent):s(t)?yield*D(e,t,i,o):u(t)&&(yield v(i,`${b}:`,o.indent),l(t)||(yield*f(t,i+1,o,n,h,g)))}(n,h,t,i,d,o,a,c)}function*D(e,t,i,o){if(0===t.length)return void(yield v(i,g(0,{key:e,delimiter:o.delimiter}),o.indent));if(d(t))return void(yield v(i,b(t,o.delimiter,e),o.indent));if((0===t.length||t.every(e=>s(e)))&&t.every(e=>d(e)))return void(yield*function*(e,t,i,o){for(let a of(yield v(i,g(t.length,{key:e,delimiter:o.delimiter}),o.indent),t))if(d(a)){let e=b(a,o.delimiter);yield C(i+1,e,o.indent)}}(e,t,i,o));if(c(t)){let a=y(t);a?yield*function*(e,t,i,o,a){yield v(o,g(t.length,{key:e,fields:i,delimiter:a.delimiter}),a.indent),yield*_(t,i,o+1,a)}(e,t,a,i,o):yield*A(e,t,i,o);return}yield*A(e,t,i,o)}function b(e,t,i){let o=g(e.length,{key:i,delimiter:t}),a=h(e,t);return 0===e.length?o:`${o} ${a}`}function y(e){if(0===e.length)return;let t=Object.keys(e[0]);if(0!==t.length&&function(e,t){for(let i of e){if(Object.keys(i).length!==t.length)return!1;for(let e of t)if(!(e in i)||!r(i[e]))return!1}return!0}(e,t))return t}function*_(e,t,i,o){for(let a of e)yield v(i,h(t.map(e=>a[e]),o.delimiter),o.indent)}function*A(e,t,i,o){for(let a of(yield v(i,g(t.length,{key:e,delimiter:o.delimiter}),o.indent),t))yield*function* e(t,i,o){if(r(t))yield C(i,p(t,o.delimiter),o.indent);else if(s(t))if(d(t))yield C(i,b(t,o.delimiter),o.indent);else for(let a of(yield C(i,g(t.length,{delimiter:o.delimiter}),o.indent),t))yield*e(a,i+1,o);else u(t)&&(yield*function*(t,i,o){if(l(t))return void(yield v(i,"-",o.indent));let a=Object.entries(t),[n,h]=a[0],D=a.slice(1);if(s(h)&&c(h)){let e=y(h);if(e){yield C(i,g(h.length,{key:n,fields:e,delimiter:o.delimiter}),o.indent),yield*_(h,e,i+2,o),D.length>0&&(yield*f(Object.fromEntries(D),i+1,o));return}}let A=m(n);if(r(h))yield C(i,`${A}: ${p(h,o.delimiter)}`,o.indent);else if(s(h))if(0===h.length)yield C(i,`${A}${g(0,{delimiter:o.delimiter})}`,o.indent);else if(d(h))yield C(i,`${A}${b(h,o.delimiter)}`,o.indent);else for(let t of(yield C(i,`${A}${g(h.length,{delimiter:o.delimiter})}`,o.indent),h))yield*e(t,i+2,o);else u(h)&&(yield C(i,`${A}:`,o.indent),l(h)||(yield*f(h,i+2,o)));D.length>0&&(yield*f(Object.fromEntries(D),i+1,o))}(t,i,o))}(a,i+1,o)}Symbol("quotedKey");function v(e,t,i){return" ".repeat(i*e)+t}function C(e,t,i){return v(e,"- "+t,i)}function w(e,t,i){return u(e)?function(e,t,i){let o={};for(let[a,r]of Object.entries(e)){let e=[...i,a],s=t(a,r,e);void 0!==s&&(o[a]=w(n(s),t,e))}return o}(e,t,i):s(e)?function(e,t,i){let o=[];for(let a=0;a<e.length;a++){let r=e[a],s=[...i,a],u=t(String(a),r,s);if(void 0===u)continue;let l=n(u);o.push(w(l,t,s))}return o}(e,t,i):e}function F(e,t){return Array.from(function(e,t){var i,o;let a,l=n(e),d=(o=t,{indent:o?.indent??2,delimiter:o?.delimiter??",",keyFolding:o?.keyFolding??"off",flattenDepth:o?.flattenDepth??1/0,replacer:o?.replacer});return function*(e,t){if(r(e)){let i=p(e,t.delimiter);""!==i&&(yield i);return}s(e)?yield*D(void 0,e,0,t):u(e)&&(yield*f(e,0,t))}(d.replacer?void 0===(a=(i=d.replacer)("",l,[]))?w(l,i,[]):w(n(a),i,[]):l,d)}(e,t)).join("\n")}},37102(e,t,i){function o(e){return Array.isArray?Array.isArray(e):"[object Array]"===d(e)}i.d(t,{A:()=>Q});let a=1/0;function n(e){return"string"==typeof e}function r(e){return"number"==typeof e}function s(e){return"object"==typeof e}function u(e){return null!=e}function l(e){return!e.trim().length}function d(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}let c=Object.prototype.hasOwnProperty;class p{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let i=m(e);this._keys.push(i),this._keyMap[i.id]=i,t+=i.weight}),this._keys.forEach(e=>{e.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function m(e){let t=null,i=null,a=null,r=1,s=null;if(n(e)||o(e))a=e,t=h(e),i=g(e);else{if(!c.call(e,"name"))throw Error("Missing name property in key");let o=e.name;if(a=o,c.call(e,"weight")&&(r=e.weight)<=0)throw Error(`Property 'weight' in key '${o}' must be a positive integer`);t=h(o),i=g(o),s=e.getFn}return{path:t,id:i,weight:r,src:a,getFn:s}}function h(e){return o(e)?e:e.split(".")}function g(e){return o(e)?e.join("."):e}var f={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,useExtendedSearch:!1,getFn:function(e,t){let i=[],l=!1,c=(e,t,p)=>{if(u(e))if(t[p]){var m,h;let g=e[t[p]];if(!u(g))return;if(p===t.length-1&&(n(g)||r(g)||!0===(m=g)||!1===m||s(h=m)&&null!==h&&"[object Boolean]"==d(m)))i.push(null==g?"":function(e){if("string"==typeof e)return e;let t=e+"";return"0"==t&&1/e==-a?"-0":t}(g));else if(o(g)){l=!0;for(let e=0,i=g.length;e<i;e+=1)c(g[e],t,p+1)}else t.length&&c(g,t,p+1)}else i.push(e)};return c(e,n(t)?t.split("."):t,0),l?i:i[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};let D=/[^ ]+/g;class b{constructor({getFn:e=f.getFn,fieldNormWeight:t=f.fieldNormWeight}={}){this.norm=function(e=1,t=3){let i=new Map,o=Math.pow(10,t);return{get(t){let a=t.match(D).length;if(i.has(a))return i.get(a);let n=parseFloat(Math.round(1/Math.pow(a,.5*e)*o)/o);return i.set(a,n),n},clear(){i.clear()}}}(t,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((e,t)=>{this._keysMap[e.id]=t})}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,n(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){let t=this.size();n(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,i=this.size();t<i;t+=1)this.records[t].i-=1}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!u(e)||l(e))return;let i={v:e,i:t,n:this.norm.get(e)};this.records.push(i)}_addObject(e,t){let i={i:t,$:{}};this.keys.forEach((t,a)=>{let r=t.getFn?t.getFn(e):this.getFn(e,t.path);if(u(r)){if(o(r)){let e=[],t=[{nestedArrIndex:-1,value:r}];for(;t.length;){let{nestedArrIndex:i,value:a}=t.pop();if(u(a))if(n(a)&&!l(a)){let t={v:a,i:i,n:this.norm.get(a)};e.push(t)}else o(a)&&a.forEach((e,i)=>{t.push({nestedArrIndex:i,value:e})})}i.$[a]=e}else if(n(r)&&!l(r)){let e={v:r,n:this.norm.get(r)};i.$[a]=e}}}),this.records.push(i)}toJSON(){return{keys:this.keys,records:this.records}}}function y(e,t,{getFn:i=f.getFn,fieldNormWeight:o=f.fieldNormWeight}={}){let a=new b({getFn:i,fieldNormWeight:o});return a.setKeys(e.map(m)),a.setSources(t),a.create(),a}function _(e,{errors:t=0,currentLocation:i=0,expectedLocation:o=0,distance:a=f.distance,ignoreLocation:n=f.ignoreLocation}={}){let r=t/e.length;if(n)return r;let s=Math.abs(o-i);return a?r+s/a:s?1:r}let A=String.prototype.normalize?e=>e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,""):e=>e;class v{constructor(e,{location:t=f.location,threshold:i=f.threshold,distance:o=f.distance,includeMatches:a=f.includeMatches,findAllMatches:n=f.findAllMatches,minMatchCharLength:r=f.minMatchCharLength,isCaseSensitive:s=f.isCaseSensitive,ignoreDiacritics:u=f.ignoreDiacritics,ignoreLocation:l=f.ignoreLocation}={}){if(this.options={location:t,threshold:i,distance:o,includeMatches:a,findAllMatches:n,minMatchCharLength:r,isCaseSensitive:s,ignoreDiacritics:u,ignoreLocation:l},e=s?e:e.toLowerCase(),e=u?A(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let d=(e,t)=>{this.chunks.push({pattern:e,alphabet:function(e){let t={};for(let i=0,o=e.length;i<o;i+=1){let a=e.charAt(i);t[a]=(t[a]||0)|1<<o-i-1}return t}(e),startIndex:t})},c=this.pattern.length;if(c>32){let e=0,t=c%32,i=c-t;for(;e<i;)d(this.pattern.substr(e,32),e),e+=32;if(t){let e=c-32;d(this.pattern.substr(e),e)}}else d(this.pattern,0)}searchIn(e){let{isCaseSensitive:t,ignoreDiacritics:i,includeMatches:o}=this.options;if(e=t?e:e.toLowerCase(),e=i?A(e):e,this.pattern===e){let t={isMatch:!0,score:0};return o&&(t.indices=[[0,e.length-1]]),t}let{location:a,distance:n,threshold:r,findAllMatches:s,minMatchCharLength:u,ignoreLocation:l}=this.options,d=[],c=0,p=!1;this.chunks.forEach(({pattern:t,alphabet:i,startIndex:m})=>{let{isMatch:h,score:g,indices:D}=function(e,t,i,{location:o=f.location,distance:a=f.distance,threshold:n=f.threshold,findAllMatches:r=f.findAllMatches,minMatchCharLength:s=f.minMatchCharLength,includeMatches:u=f.includeMatches,ignoreLocation:l=f.ignoreLocation}={}){let d;if(t.length>32)throw Error("Pattern length exceeds max of 32.");let c=t.length,p=e.length,m=Math.max(0,Math.min(o,p)),h=n,g=m,D=s>1||u,b=D?Array(p):[];for(;(d=e.indexOf(t,g))>-1;)if(h=Math.min(_(t,{currentLocation:d,expectedLocation:m,distance:a,ignoreLocation:l}),h),g=d+c,D){let e=0;for(;e<c;)b[d+e]=1,e+=1}g=-1;let y=[],A=1,v=c+p,C=1<<c-1;for(let o=0;o<c;o+=1){let n=0,s=v;for(;n<s;)_(t,{errors:o,currentLocation:m+s,expectedLocation:m,distance:a,ignoreLocation:l})<=h?n=s:v=s,s=Math.floor((v-n)/2+n);v=s;let u=Math.max(1,m-s+1),d=r?p:Math.min(m+s,p)+c,f=Array(d+2);f[d+1]=(1<<o)-1;for(let n=d;n>=u;n-=1){let r=n-1,s=i[e.charAt(r)];if(D&&(b[r]=+!!s),f[n]=(f[n+1]<<1|1)&s,o&&(f[n]|=(y[n+1]|y[n])<<1|1|y[n+1]),f[n]&C&&(A=_(t,{errors:o,currentLocation:r,expectedLocation:m,distance:a,ignoreLocation:l}))<=h){if(h=A,(g=r)<=m)break;u=Math.max(1,2*m-g)}}if(_(t,{errors:o+1,currentLocation:m,expectedLocation:m,distance:a,ignoreLocation:l})>h)break;y=f}let w={isMatch:g>=0,score:Math.max(.001,A)};if(D){let e=function(e=[],t=f.minMatchCharLength){let i=[],o=-1,a=-1,n=0;for(let r=e.length;n<r;n+=1){let r=e[n];r&&-1===o?o=n:r||-1===o||((a=n-1)-o+1>=t&&i.push([o,a]),o=-1)}return e[n-1]&&n-o>=t&&i.push([o,n-1]),i}(b,s);e.length?u&&(w.indices=e):w.isMatch=!1}return w}(e,t,i,{location:a+m,distance:n,threshold:r,findAllMatches:s,minMatchCharLength:u,includeMatches:o,ignoreLocation:l});h&&(p=!0),c+=g,h&&D&&(d=[...d,...D])});let m={isMatch:p,score:p?c/this.chunks.length:1};return p&&o&&(m.indices=d),m}}class C{constructor(e){this.pattern=e}static isMultiMatch(e){return w(e,this.multiRegex)}static isSingleMatch(e){return w(e,this.singleRegex)}search(){}}function w(e,t){let i=e.match(t);return i?i[1]:null}class F extends C{constructor(e,{location:t=f.location,threshold:i=f.threshold,distance:o=f.distance,includeMatches:a=f.includeMatches,findAllMatches:n=f.findAllMatches,minMatchCharLength:r=f.minMatchCharLength,isCaseSensitive:s=f.isCaseSensitive,ignoreDiacritics:u=f.ignoreDiacritics,ignoreLocation:l=f.ignoreLocation}={}){super(e),this._bitapSearch=new v(e,{location:t,threshold:i,distance:o,includeMatches:a,findAllMatches:n,minMatchCharLength:r,isCaseSensitive:s,ignoreDiacritics:u,ignoreLocation:l})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class x extends C{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t,i=0,o=[],a=this.pattern.length;for(;(t=e.indexOf(this.pattern,i))>-1;)i=t+a,o.push([t,i-1]);let n=!!o.length;return{isMatch:n,score:+!n,indices:o}}}let E=[class extends C{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){let t=e===this.pattern;return{isMatch:t,score:+!t,indices:[0,this.pattern.length-1]}}},x,class extends C{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){let t=e.startsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,this.pattern.length-1]}}},class extends C{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){let t=!e.startsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},class extends C{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){let t=!e.endsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},class extends C{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){let t=e.endsWith(this.pattern);return{isMatch:t,score:+!t,indices:[e.length-this.pattern.length,e.length-1]}}},class extends C{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){let t=-1===e.indexOf(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},F],k=E.length,B=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,I=new Set([F.type,x.type]),S=[];function T(e,t){for(let i=0,o=S.length;i<o;i+=1){let o=S[i];if(o.condition(e,t))return new o(e,t)}return new v(e,t)}let M="$and",L="$path",N=e=>!!(e[M]||e.$or),P=e=>({[M]:Object.keys(e).map(t=>({[t]:e[t]}))});function R(e,t,{auto:i=!0}={}){let a=e=>{let r=Object.keys(e),u=!!e[L];if(!u&&r.length>1&&!N(e))return a(P(e));if(!o(e)&&s(e)&&!N(e)){let o=u?e[L]:r[0],a=u?e.$val:e[o];if(!n(a))throw Error(`Invalid value for key ${o}`);let s={keyId:g(o),pattern:a};return i&&(s.searcher=T(a,t)),s}let l={children:[],operator:r[0]};return r.forEach(t=>{let i=e[t];o(i)&&i.forEach(e=>{l.children.push(a(e))})}),l};return N(e)||(e=P(e)),a(e)}function U(e,t){let i=e.matches;t.matches=[],u(i)&&i.forEach(e=>{if(!u(e.indices)||!e.indices.length)return;let{indices:i,value:o}=e,a={indices:i,value:o};e.key&&(a.key=e.key.src),e.idx>-1&&(a.refIndex=e.idx),t.matches.push(a)})}function $(e,t){t.score=e.score}class Q{constructor(e,t={},i){this.options={...f,...t},this.options.useExtendedSearch,this._keyStore=new p(this.options.keys),this.setCollection(e,i)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof b))throw Error("Incorrect 'index' type");this._myIndex=t||y(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){u(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){let t=[];for(let i=0,o=this._docs.length;i<o;i+=1){let a=this._docs[i];e(a,i)&&(this.removeAt(i),i-=1,o-=1,t.push(a))}return t}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:t=-1}={}){let{includeMatches:i,includeScore:o,shouldSort:a,sortFn:s,ignoreFieldNorm:u}=this.options,l=n(e)?n(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return!function(e,{ignoreFieldNorm:t=f.ignoreFieldNorm}){e.forEach(e=>{let i=1;e.matches.forEach(({key:e,norm:o,score:a})=>{let n=e?e.weight:null;i*=Math.pow(0===a&&n?Number.EPSILON:a,(n||1)*(t?1:o))}),e.score=i})}(l,{ignoreFieldNorm:u}),a&&l.sort(s),r(t)&&t>-1&&(l=l.slice(0,t)),function(e,t,{includeMatches:i=f.includeMatches,includeScore:o=f.includeScore}={}){let a=[];return i&&a.push(U),o&&a.push($),e.map(e=>{let{idx:i}=e,o={item:t[i],refIndex:i};return a.length&&a.forEach(t=>{t(e,o)}),o})}(l,this._docs,{includeMatches:i,includeScore:o})}_searchStringList(e){let t=T(e,this.options),{records:i}=this._myIndex,o=[];return i.forEach(({v:e,i:i,n:a})=>{if(!u(e))return;let{isMatch:n,score:r,indices:s}=t.searchIn(e);n&&o.push({item:e,idx:i,matches:[{score:r,value:e,norm:a,indices:s}]})}),o}_searchLogical(e){let t=R(e,this.options),i=(e,t,o)=>{if(!e.children){let{keyId:i,searcher:a}=e,n=this._findMatches({key:this._keyStore.get(i),value:this._myIndex.getValueForItemAtKeyId(t,i),searcher:a});return n&&n.length?[{idx:o,item:t,matches:n}]:[]}let a=[];for(let n=0,r=e.children.length;n<r;n+=1){let r=i(e.children[n],t,o);if(r.length)a.push(...r);else if(e.operator===M)return[]}return a},o=this._myIndex.records,a={},n=[];return o.forEach(({$:e,i:o})=>{if(u(e)){let r=i(t,e,o);r.length&&(a[o]||(a[o]={idx:o,item:e,matches:[]},n.push(a[o])),r.forEach(({matches:e})=>{a[o].matches.push(...e)}))}}),n}_searchObjectList(e){let t=T(e,this.options),{keys:i,records:o}=this._myIndex,a=[];return o.forEach(({$:e,i:o})=>{if(!u(e))return;let n=[];i.forEach((i,o)=>{n.push(...this._findMatches({key:i,value:e[o],searcher:t}))}),n.length&&a.push({idx:o,item:e,matches:n})}),a}_findMatches({key:e,value:t,searcher:i}){if(!u(t))return[];let a=[];if(o(t))t.forEach(({v:t,i:o,n:n})=>{if(!u(t))return;let{isMatch:r,score:s,indices:l}=i.searchIn(t);r&&a.push({score:s,key:e,value:t,idx:o,norm:n,indices:l})});else{let{v:o,n:n}=t,{isMatch:r,score:s,indices:u}=i.searchIn(o);r&&a.push({score:s,key:e,value:o,norm:n,indices:u})}return a}}Q.version="7.1.0",Q.createIndex=y,Q.parseIndex=function(e,{getFn:t=f.getFn,fieldNormWeight:i=f.fieldNormWeight}={}){let{keys:o,records:a}=e,n=new b({getFn:t,fieldNormWeight:i});return n.setKeys(o),n.setIndexRecords(a),n},Q.config=f,Q.parseQuery=R,function(...e){S.push(...e)}(class{constructor(e,{isCaseSensitive:t=f.isCaseSensitive,ignoreDiacritics:i=f.ignoreDiacritics,includeMatches:o=f.includeMatches,minMatchCharLength:a=f.minMatchCharLength,ignoreLocation:n=f.ignoreLocation,findAllMatches:r=f.findAllMatches,location:s=f.location,threshold:u=f.threshold,distance:l=f.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:i,includeMatches:o,minMatchCharLength:a,findAllMatches:r,ignoreLocation:n,location:s,threshold:u,distance:l},e=t?e:e.toLowerCase(),e=i?A(e):e,this.pattern=e,this.query=function(e,t={}){return e.split("|").map(e=>{let i=e.trim().split(B).filter(e=>e&&!!e.trim()),o=[];for(let e=0,a=i.length;e<a;e+=1){let a=i[e],n=!1,r=-1;for(;!n&&++r<k;){let e=E[r],i=e.isMultiMatch(a);i&&(o.push(new e(i,t)),n=!0)}if(!n)for(r=-1;++r<k;){let e=E[r],i=e.isSingleMatch(a);if(i){o.push(new e(i,t));break}}}return o})}(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){let t=this.query;if(!t)return{isMatch:!1,score:1};let{includeMatches:i,isCaseSensitive:o,ignoreDiacritics:a}=this.options;e=o?e:e.toLowerCase(),e=a?A(e):e;let n=0,r=[],s=0;for(let o=0,a=t.length;o<a;o+=1){let a=t[o];r.length=0,n=0;for(let t=0,o=a.length;t<o;t+=1){let o=a[t],{isMatch:u,indices:l,score:d}=o.search(e);if(u){if(n+=1,s+=d,i){let e=o.constructor.type;I.has(e)?r=[...r,...l]:r.push(l)}}else{s=0,n=0,r.length=0;break}}if(n){let e={isMatch:!0,score:s/n};return i&&(e.indices=r),e}}return{isMatch:!1,score:1}}})},43776(e,t,i){let o,a,n,r,s,u,l,d,c,p,m,h,g,f;i.d(t,{A:()=>U});var D=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,b=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,y=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,_=e=>"string"==typeof e&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||"$"===e||"_"===e||b.test(e)),A=e=>"string"==typeof e&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||"$"===e||"_"===e||"‌"===e||"‍"===e||y.test(e)),v=e=>"string"==typeof e&&/[0-9]/.test(e),C=e=>"string"==typeof e&&/[0-9A-Fa-f]/.test(e);function w(){if(o[r])return String.fromCodePoint(o.codePointAt(r))}function F(){let e=w();return"\n"===e?(s++,u=0):e?u+=e.length:u++,e&&(r+=e.length),e}let x={default(){let e;switch(f){case" ":case"\v":case"\f":case" ":case"\xa0":case"\uFEFF":case"\n":case"\r":case"\u2028":case"\u2029":F();return;case"/":F(),p="comment";return;case void 0:return F(),E("eof")}return"string"==typeof(e=f)&&D.test(e)?void F():x[a]()},comment(){switch(f){case"*":F(),p="multiLineComment";return;case"/":F(),p="singleLineComment";return}throw M(F())},multiLineComment(){switch(f){case"*":F(),p="multiLineCommentAsterisk";return;case void 0:throw M(F())}F()},multiLineCommentAsterisk(){switch(f){case"*":F();return;case"/":F(),p="default";return;case void 0:throw M(F())}F(),p="multiLineComment"},singleLineComment(){switch(f){case"\n":case"\r":case"\u2028":case"\u2029":F(),p="default";return;case void 0:return F(),E("eof")}F()},value(){switch(f){case"{":case"[":return E("punctuator",F());case"n":return F(),k("ull"),E("null",null);case"t":return F(),k("rue"),E("boolean",!0);case"f":return F(),k("alse"),E("boolean",!1);case"-":case"+":"-"===F()&&(g=-1),p="sign";return;case".":m=F(),p="decimalPointLeading";return;case"0":m=F(),p="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":m=F(),p="decimalInteger";return;case"I":return F(),k("nfinity"),E("numeric",1/0);case"N":return F(),k("aN"),E("numeric",NaN);case'"':case"'":h='"'===F(),m="",p="string";return}throw M(F())},identifierNameStartEscape(){if("u"!==f)throw M(F());F();let e=B();switch(e){case"$":case"_":break;default:if(!_(e))throw N()}m+=e,p="identifierName"},identifierName(){switch(f){case"$":case"_":case"‌":case"‍":m+=F();return;case"\\":F(),p="identifierNameEscape";return}if(A(f)){m+=F();return}return E("identifier",m)},identifierNameEscape(){if("u"!==f)throw M(F());F();let e=B();switch(e){case"$":case"_":case"‌":case"‍":break;default:if(!A(e))throw N()}m+=e,p="identifierName"},sign(){switch(f){case".":m=F(),p="decimalPointLeading";return;case"0":m=F(),p="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":m=F(),p="decimalInteger";return;case"I":return F(),k("nfinity"),E("numeric",1/0*g);case"N":return F(),k("aN"),E("numeric",NaN)}throw M(F())},zero(){switch(f){case".":m+=F(),p="decimalPoint";return;case"e":case"E":m+=F(),p="decimalExponent";return;case"x":case"X":m+=F(),p="hexadecimal";return}return E("numeric",0*g)},decimalInteger(){switch(f){case".":m+=F(),p="decimalPoint";return;case"e":case"E":m+=F(),p="decimalExponent";return}if(v(f)){m+=F();return}return E("numeric",g*Number(m))},decimalPointLeading(){if(v(f)){m+=F(),p="decimalFraction";return}throw M(F())},decimalPoint(){switch(f){case"e":case"E":m+=F(),p="decimalExponent";return}if(v(f)){m+=F(),p="decimalFraction";return}return E("numeric",g*Number(m))},decimalFraction(){switch(f){case"e":case"E":m+=F(),p="decimalExponent";return}if(v(f)){m+=F();return}return E("numeric",g*Number(m))},decimalExponent(){switch(f){case"+":case"-":m+=F(),p="decimalExponentSign";return}if(v(f)){m+=F(),p="decimalExponentInteger";return}throw M(F())},decimalExponentSign(){if(v(f)){m+=F(),p="decimalExponentInteger";return}throw M(F())},decimalExponentInteger(){if(v(f)){m+=F();return}return E("numeric",g*Number(m))},hexadecimal(){if(C(f)){m+=F(),p="hexadecimalInteger";return}throw M(F())},hexadecimalInteger(){if(C(f)){m+=F();return}return E("numeric",g*Number(m))},string(){switch(f){case"\\":F(),m+=function(){switch(w()){case"b":return F(),"\b";case"f":return F(),"\f";case"n":return F(),"\n";case"r":return F(),"\r";case"t":return F()," ";case"v":return F(),"\v";case"0":if(F(),v(w()))throw M(F());return"\0";case"x":return F(),function(){let e="",t=w();if(!C(t)||(e+=F(),!C(t=w())))throw M(F());return String.fromCodePoint(parseInt(e+=F(),16))}();case"u":return F(),B();case"\n":case"\u2028":case"\u2029":return F(),"";case"\r":return F(),"\n"===w()&&F(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case void 0:throw M(F())}return F()}();return;case'"':if(h)return F(),E("string",m);m+=F();return;case"'":if(!h)return F(),E("string",m);m+=F();return;case"\n":case"\r":case void 0:throw M(F());case"\u2028":case"\u2029":var e;e=f,console.warn(`JSON5: '${P(e)}' in strings is not valid ECMAScript; consider escaping`)}m+=F()},start(){switch(f){case"{":case"[":return E("punctuator",F())}p="value"},beforePropertyName(){switch(f){case"$":case"_":m=F(),p="identifierName";return;case"\\":F(),p="identifierNameStartEscape";return;case"}":return E("punctuator",F());case'"':case"'":h='"'===F(),p="string";return}if(_(f)){m+=F(),p="identifierName";return}throw M(F())},afterPropertyName(){if(":"===f)return E("punctuator",F());throw M(F())},beforePropertyValue(){p="value"},afterPropertyValue(){switch(f){case",":case"}":return E("punctuator",F())}throw M(F())},beforeArrayValue(){if("]"===f)return E("punctuator",F());p="value"},afterArrayValue(){switch(f){case",":case"]":return E("punctuator",F())}throw M(F())},end(){throw M(F())}};function E(e,t){return{type:e,value:t,line:s,column:u}}function k(e){for(let t of e){if(w()!==t)throw M(F());F()}}function B(){let e="",t=4;for(;t-- >0;){if(!C(w()))throw M(F());e+=F()}return String.fromCodePoint(parseInt(e,16))}let I={start(){if("eof"===l.type)throw L();S()},beforePropertyName(){switch(l.type){case"identifier":case"string":d=l.value,a="afterPropertyName";return;case"punctuator":T();return;case"eof":throw L()}},afterPropertyName(){if("eof"===l.type)throw L();a="beforePropertyValue"},beforePropertyValue(){if("eof"===l.type)throw L();S()},beforeArrayValue(){if("eof"===l.type)throw L();"punctuator"===l.type&&"]"===l.value?T():S()},afterPropertyValue(){if("eof"===l.type)throw L();switch(l.value){case",":a="beforePropertyName";return;case"}":T()}},afterArrayValue(){if("eof"===l.type)throw L();switch(l.value){case",":a="beforeArrayValue";return;case"]":T()}},end(){}};function S(){let e;switch(l.type){case"punctuator":switch(l.value){case"{":e={};break;case"[":e=[]}break;case"null":case"boolean":case"numeric":case"string":e=l.value}if(void 0===c)c=e;else{let t=n[n.length-1];Array.isArray(t)?t.push(e):Object.defineProperty(t,d,{value:e,writable:!0,enumerable:!0,configurable:!0})}if(null!==e&&"object"==typeof e)n.push(e),a=Array.isArray(e)?"beforeArrayValue":"beforePropertyName";else{let e=n[n.length-1];a=null==e?"end":Array.isArray(e)?"afterArrayValue":"afterPropertyValue"}}function T(){n.pop();let e=n[n.length-1];a=null==e?"end":Array.isArray(e)?"afterArrayValue":"afterPropertyValue"}function M(e){return void 0===e?R(`JSON5: invalid end of input at ${s}:${u}`):R(`JSON5: invalid character '${P(e)}' at ${s}:${u}`)}function L(){return R(`JSON5: invalid end of input at ${s}:${u}`)}function N(){return u-=5,R(`JSON5: invalid identifier character at ${s}:${u}`)}function P(e){let t={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(t[e])return t[e];if(e<" "){let t=e.charCodeAt(0).toString(16);return"\\x"+("00"+t).substring(t.length)}return e}function R(e){let t=SyntaxError(e);return t.lineNumber=s,t.columnNumber=u,t}let U={parse:function(e,t){o=String(e),a="start",n=[],r=0,s=1,u=0,l=void 0,d=void 0,c=void 0;do l=function(){for(p="default",m="",h=!1,g=1;;){f=w();let e=x[p]();if(e)return e}}(),I[a]();while("eof"!==l.type);return"function"==typeof t?function e(t,i,o){let a=t[i];if(null!=a&&"object"==typeof a)if(Array.isArray(a))for(let t=0;t<a.length;t++){let i=String(t),n=e(a,i,o);void 0===n?delete a[i]:Object.defineProperty(a,i,{value:n,writable:!0,enumerable:!0,configurable:!0})}else for(let t in a){let i=e(a,t,o);void 0===i?delete a[t]:Object.defineProperty(a,t,{value:i,writable:!0,enumerable:!0,configurable:!0})}return o.call(t,i,a)}({"":c},"",t):c},stringify:function(e,t,i){let o,a,n,r=[],s="",u="";if(null==t||"object"!=typeof t||Array.isArray(t)||(i=t.space,n=t.quote,t=t.replacer),"function"==typeof t)a=t;else if(Array.isArray(t))for(let e of(o=[],t)){let t;"string"==typeof e?t=e:("number"==typeof e||e instanceof String||e instanceof Number)&&(t=String(e)),void 0!==t&&0>o.indexOf(t)&&o.push(t)}return i instanceof Number?i=Number(i):i instanceof String&&(i=String(i)),"number"==typeof i?i>0&&(i=Math.min(10,Math.floor(i)),u=" ".substr(0,i)):"string"==typeof i&&(u=i.substr(0,10)),function e(t,i){let n=i[t];switch(null!=n&&("function"==typeof n.toJSON5?n=n.toJSON5(t):"function"==typeof n.toJSON&&(n=n.toJSON(t))),a&&(n=a.call(i,t,n)),n instanceof Number?n=Number(n):n instanceof String?n=String(n):n instanceof Boolean&&(n=n.valueOf()),n){case null:return"null";case!0:return"true";case!1:return"false"}return"string"==typeof n?l(n):"number"==typeof n?String(n):"object"==typeof n?Array.isArray(n)?function(t){let i;if(r.indexOf(t)>=0)throw TypeError("Converting circular structure to JSON5");r.push(t);let o=s;s+=u;let a=[];for(let i=0;i<t.length;i++){let o=e(String(i),t);a.push(void 0!==o?o:"null")}if(0===a.length)i="[]";else if(""===u)i="["+a.join(",")+"]";else{let e=",\n"+s,t=a.join(e);i="[\n"+s+t+",\n"+o+"]"}return r.pop(),s=o,i}(n):function(t){let i;if(r.indexOf(t)>=0)throw TypeError("Converting circular structure to JSON5");r.push(t);let a=s;s+=u;let n=o||Object.keys(t),d=[];for(let i of n){let o=e(i,t);if(void 0!==o){let e=function(e){if(0===e.length)return l(e);let t=String.fromCodePoint(e.codePointAt(0));if(!_(t))return l(e);for(let i=t.length;i<e.length;i++)if(!A(String.fromCodePoint(e.codePointAt(i))))return l(e);return e}(i)+":";""!==u&&(e+=" "),e+=o,d.push(e)}}if(0===d.length)i="{}";else{let e;if(""===u)i="{"+(e=d.join(","))+"}";else{let t=",\n"+s;e=d.join(t),i="{\n"+s+e+",\n"+a+"}"}}return r.pop(),s=a,i}(n):void 0}("",{"":e});function l(e){let t={"'":.1,'"':.2},i={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},o="";for(let a=0;a<e.length;a++){let n=e[a];switch(n){case"'":case'"':t[n]++,o+=n;continue;case"\0":if(v(e[a+1])){o+="\\x00";continue}}if(i[n]){o+=i[n];continue}if(n<" "){let e=n.charCodeAt(0).toString(16);o+="\\x"+("00"+e).substring(e.length);continue}o+=n}let a=n||Object.keys(t).reduce((e,i)=>t[e]<t[i]?e:i);return o=o.replace(RegExp(a,"g"),i[a]),a+o+a}}}}};