Skip to main content

Una libreria simple para usar modelos de Huggingface

Project description

Una libreria simple para usar modelos de huggingface de forma sencilla en pocas lineas de codigo Ya sea con transformers o usando la api de request de huggingface, puedes generar imagenes de forma rapida con Stable diffusion

instalacion de la libreria:

pip3 install HuggingSimpleCuellar_lib

Genera Imagenes usando la api de huggingface:

from HuggingSimpleCuellar_lib import generate_image

generate_image(
    model_name="Ingresa_modelo_Stable diffusion",
    token="Tu_token_hugging",
    prompt="descripcion de la imagen",
    title="Titulo para guardar la Imagen"
)

Para generar texto usando la Api:

from HuggingSimpleCuellar_lib import generate_text

generated_text = generate_text(
    model_name="EleutherAI/gpt-neo-125m",
    token="Tu_Token_Huggingface",
    prompt="Can you please let us know more details about your",
    max_length=50
)

print(generated_text)

Para generar texto usando transformers:

from HuggingSimpleCuellar_lib import generate_transformers_text

generated_transformers_text = generate_transformers_text(
    model_name="Emilianohack6950/M.A.R.I.A",
    prompt="Hello, how are you?",
    max_length=50
)

print(generated_transformers_text)

si quieres usar un modelo de tensorflow:

from HuggingSimpleCuellar_lib import generate_transformers_text

generated_transformersTF_text = generate_transformersTF_text(
    model_name="Emilianohack6950/M.A.R.I.A",
    prompt="Hello, how are you?",
    max_length=50
)

print(generated_transformers_text)

Para generar imagenes con Stable diffusion en caso de tener una Gpu en tu ordenador:

from HuggingSimpleCuellar_lib import generate_image_diffusers

generate_image_diffusers = generate_image_diffusers(
    nombre_del_modelo="Nombre_del_modelo_Stable_diffusion", 
    ingresa_prompt="Descripcion_de_la_imagen", 
    nombre_de_la_imagen="Nombre_a_guardar_la_imagen"
)

Por el momento la libreria aun se encuentra en desarrollo pronto se le agregaran mas cosas como entrenamiento de modelos de lenguaje usando la api de transformers en pocas lineas de codigo

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

huggingsimplecuellar_lib-1.0.2.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file huggingsimplecuellar_lib-1.0.2.tar.gz.

File metadata

File hashes

Hashes for huggingsimplecuellar_lib-1.0.2.tar.gz
Algorithm Hash digest
SHA256 c35b2f14aaa59582b5d9889e6e37b9e2399514583834e1aa40ceb7471dbc01d4
MD5 73825da0845ef0e7595d85652e922947
BLAKE2b-256 3d81a6f42dbd46344f721c23661e60705c38086548d0de77b3fcf29e48e82f9d

See more details on using hashes here.

File details

Details for the file huggingsimplecuellar_lib-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for huggingsimplecuellar_lib-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 eca116fdf233081da4456265b63719718819483af8f42d38a034e2dae67faf66
MD5 a722bbf01591ba1980aa15c9629e2578
BLAKE2b-256 d97ff4d740b444c942a2872ea1406f556068f14aa2de7ee8e7472c0355cb79b9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page