| hf_ez_text2text_generation | R Documentation |
Essentially Text-generation task. But uses Encoder-Decoder architecture, so might change in the future for more options.
hf_ez_text2text_generation(model_id = "google/flan-t5-large", use_api = FALSE)
model_id |
A model_id. Run hf_search_models(...) for model_ids. Defaults to 'google/flan-t5-small'. |
use_api |
Whether to use the Inference API to run the model (TRUE) or download and run the model locally (FALSE). Defaults to FALSE |
A text2text generation object
https://huggingface.co/docs/api-inference/detailed_parameters#text2text-generation-task
## Not run:
# Load the default model and use local inference
ez <- hf_ez_text2text_generation()
ez$infer("Please answer the following question. What is the boiling point of Nitrogen?")
# Use the api for inference.
ez <- hf_ez_text2text_generation(use_api = TRUE)
ez$infer("Please answer the following question. What is the boiling point of Nitrogen?")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.