Package: huggingfaceR 2.1.0

Alex Farach

huggingfaceR: Access 'Hugging Face' Models and Datasets

Access models and datasets hosted on the 'Hugging Face' Hub through its Inference Application Programming Interface (API). Run text classification, embeddings, chat, translation, image, audio, and other tasks from tidy 'R' workflows without installing 'Python' by default. Results are returned as data frames or simple 'R' objects so they can be composed with 'dplyr', 'tidyr', and related tooling. Helpers also support Hub search, file download, provider discovery, and guarded uploads for authenticated workflows.

Authors:Alex Farach [aut, cre, cph], Sam Terfa [aut, cph], Jack Penzer [aut, cph]

huggingfaceR_2.1.0.tar.gz
huggingfaceR_2.1.0.tar.gz(r-4.7-any)huggingfaceR_2.1.0.tar.gz(r-4.6-any)
huggingfaceR_2.1.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
huggingfaceR/json (API)

# Install 'huggingfaceR' in R:
install.packages('huggingfaceR', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/farach/huggingfacer/issues

Pkgdown/docs site:https://farach.github.io

Datasets:

On CRAN:

Conda:

2.40 score 50 scripts 94 exports 27 dependencies

Last updated from:a8547dfa72. Checks:4 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK214
source / vignettesOK251
linux-release-x86_64OK203
wasm-releaseOK191

Exports:%>%chathf_caption_imagehf_chathf_check_inferencehf_classifyhf_classify_batchhf_classify_chunkshf_classify_imagehf_classify_zero_shothf_classify_zero_shot_batchhf_cluster_textshf_conversationhf_create_repohf_dataset_infohf_default_modelhf_delete_repohf_describe_imagehf_detect_objectshf_embedhf_embed_batchhf_embed_chunkshf_embed_texthf_embed_umaphf_extracthf_extract_topicshf_ez_conversationalhf_ez_fill_maskhf_ez_question_answeringhf_ez_sentence_similarityhf_ez_summarizationhf_ez_table_question_answeringhf_ez_text_classificationhf_ez_text_generationhf_ez_text2text_generationhf_ez_token_classificationhf_ez_translationhf_ez_zero_shot_classificationhf_fill_maskhf_fill_mask_payloadhf_generatehf_hub_downloadhf_inferencehf_list_authorshf_list_datasetshf_list_languageshf_list_librarieshf_list_licenseshf_list_modelshf_list_providershf_list_repo_fileshf_list_taskshf_load_AutoModel_for_taskhf_load_datasethf_load_modelhf_load_pipelinehf_load_sentence_modelhf_load_tokenizerhf_model_infohf_nearest_neighborshf_nerhf_push_datasethf_python_dependshf_question_answerhf_question_answering_payloadhf_read_chunkshf_run_toolshf_search_datasetshf_search_modelshf_search_papershf_search_spaceshf_sentence_encodehf_sentence_similarity_payloadhf_set_devicehf_set_tokenhf_similarityhf_summarization_payloadhf_summarizehf_table_question_answerhf_table_question_answering_payloadhf_text_classification_payloadhf_text_generation_payloadhf_text_to_imagehf_text_to_speechhf_text2text_generation_payloadhf_token_classification_payloadhf_toolhf_transcribehf_translatehf_translation_payloadhf_upload_filehf_whoamihf_zero_shot_classification_payloadstep_hf_embed

Dependencies:askpassclicpp11curldplyrgenericsgluehttr2jsonlitelifecyclemagrittropensslpillarpkgconfigpurrrR6rappdirsrlangstringistringrsystibbletidyrtidyselectutf8vctrswithr

Readme and manuals

Help Manual

Help pageTopics
Continue a Conversationchat
Caption Imageshf_caption_image
LLM Chat Interfacehf_chat
Check Inference API Availabilityhf_check_inference
Text Classificationhf_classify
Batch Text Classification (In-Memory)hf_classify_batch
Chunked Text Classification (Disk Checkpoints)hf_classify_chunks
Classify Imageshf_classify_image
Zero-Shot Classificationhf_classify_zero_shot
Batch Zero-Shot Classification (In-Memory)hf_classify_zero_shot_batch
Cluster Texts by Semantic Similarityhf_cluster_texts
Multi-turn Conversationhf_conversation
Create a Hub Repositoryhf_create_repo
Get Dataset Informationhf_dataset_info
Default Models for Hugging Face Taskshf_default_model
Delete a Hub Repositoryhf_delete_repo
Describe an Imagehf_describe_image
Detect Objects in Imageshf_detect_objects
Generate Text Embeddingshf_embed
Batch Embedding Generation (In-Memory)hf_embed_batch
Chunked Embedding Generation (Disk Checkpoints)hf_embed_chunks
Embed Text with Tidytext Compatibilityhf_embed_text
Dimensionality Reduction with UMAPhf_embed_umap
Extract Structured Data from Texthf_extract
Extract Semantic Topics from Texthf_extract_topics
Create a Conversational Agenthf_ez_conversational
Conversational API Inferencehf_ez_conversational_api_inference
Conversational Local Inferencehf_ez_conversational_local_inference
Perform Fill-in-the-Blank Taskshf_ez_fill_mask
Fill Mask API Inferencehf_ez_fill_mask_api_inference
Fill Mask Local Inferencehf_ez_fill_mask_local_inference
Answer Questions about a Text based on Contexthf_ez_question_answering
Question Answering API Inferencehf_ez_question_answering_api_inference
Question Answering Local Inferencehf_ez_question_answering_local_inference
Compare Sentence Similarity Semanticallyhf_ez_sentence_similarity
Sentence Similarity API Inferencehf_ez_sentence_similarity_api_inference
Sentence Similarity Local Inferencehf_ez_sentence_similarity_local_inference
Summarize a Texthf_ez_summarization
Summarization API Inferencehf_ez_summarization_api_inference
Summarization Local Inferencehf_ez_summarization_local_inference
Answer Questions about a Data Tablehf_ez_table_question_answering
Table Question Answering API Inferencehf_ez_table_question_answering_api_inference
Table Question Answering Local Inferencehf_ez_table_question_answering_local_inference
Classify Texts into Pre-trained Categorieshf_ez_text_classification
Text Classification API Inferencehf_ez_text_classification_api_inference
Text Classification Local Inferencehf_ez_text_classification_local_inference
Generate Text from a Prompthf_ez_text_generation
Text Generation API Inferencehf_ez_text_generation_api_inference
Text Generation Local Inferencehf_ez_text_generation_local_inference
Answer General Questionshf_ez_text2text_generation
Text2Text Generation API Inferencehf_ez_text2text_generation_api_inference
Text2Text Generation Local Inferencehf_ez_text2text_generation_local_inference
Classify parts of a Texthf_ez_token_classification
Token Classification API Inferencehf_ez_token_classification_api_inference
Token Classification Local Inferencehf_ez_token_classification_local_inference
Translate between Languageshf_ez_translation
Translation API Inferencehf_ez_translation_api_inference
Translation Local Inferencehf_ez_translation_local_inference
Perform Text Classification with No Context Requiredhf_ez_zero_shot_classification
Zero Shot Classification API Inferencehf_ez_zero_shot_classification_api_inference
Zero Shot Classification Local Inferencehf_ez_zero_shot_classification_local_inference
Fill Maskhf_fill_mask
Fill Mask Task Payloadhf_fill_mask_payload
Text Generationhf_generate
Download a File from the Hubhf_hub_download
Inference using a downloaded Hugging Face model or pipeline, or using the Inference APIhf_inference
List Authorshf_list_authors
List Datasetshf_list_datasets
List Languageshf_list_languages
List Librarieshf_list_libraries
List Licenseshf_list_licenses
List Modelshf_list_models
List Inference Providers for a Modelhf_list_providers
List Files in a Hub Repositoryhf_list_repo_files
List Available Taskshf_list_tasks
Import a pre-trained AutoModel object for a specific task.hf_load_AutoModel_for_task
Load Dataset via Hugging Face Datasets Server APIhf_load_dataset
Load a pre-trained AutoModel object from Hugging Facehf_load_model
Load a pipeline object from Hugging Face - pipelines usually include a model, tokenizer and task.hf_load_pipeline
Load a Sentence Transformers model to extract sentence/document embeddingshf_load_sentence_model
Load an AutoTokenizer from a pre-tained modelhf_load_tokenizer
Get Model Informationhf_model_info
Find Nearest Neighbors by Semantic Similarityhf_nearest_neighbors
Named Entity Recognition (Token Classification)hf_ner
Push a Data Frame as a Dataset Filehf_push_dataset
Install Python Dependencieshf_python_depends
Extractive Question Answeringhf_question_answer
Question Answering Payloadhf_question_answering_payload
Read All Chunks from Directoryhf_read_chunks
Run Tool Calls in a Conversationhf_run_tools
Search Datasets on Hugging Face Hubhf_search_datasets
Search Models on Hugging Face Hubhf_search_models
Search Papers on Hugging Facehf_search_papers
Search Spaces on Hugging Face Hubhf_search_spaces
Use a Sentence Transformers pipeline to extract document(s)/sentence(s) embedding(s)hf_sentence_encode
Sentence Similarity Payloadhf_sentence_similarity_payload
Try to set device to GPU for accelerated computationhf_set_device
Set Hugging Face API Tokenhf_set_token
Compute Pairwise Similarityhf_similarity
Summarization Task Payloadhf_summarization_payload
Summarize Texthf_summarize
Table Question Answeringhf_table_question_answer
Table Question Answering Payloadhf_table_question_answering_payload
Text Classification Payloadhf_text_classification_payload
Text Generation Payloadhf_text_generation_payload
Generate an Image from Texthf_text_to_image
Convert Text to Speechhf_text_to_speech
Text2Text Generation Payloadhf_text2text_generation_payload
Token Classification Payloadhf_token_classification_payload
Define a Chat Toolhf_tool
Transcribe Audiohf_transcribe
Translate Texthf_translate
Translation Payloadhf_translation_payload
Upload a File to a Hub Repositoryhf_upload_file
Get Current Hugging Face User Informationhf_whoami
Zero Shot Classification Payloadhf_zero_shot_classification_payload
Dataset of model names, tasks & download infomodels_with_downloads
Embedding Recipe Stepstep_hf_embed tidy.step_hf_embed tunable.step_hf_embed