Instructions to use steveGomez/retinalmodel with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use steveGomez/retinalmodel with Keras:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://steveGomez/retinalmodel") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from steveGomez/retinalmodel: direct link, hf CLI and curl.
- Browser
- Download file 1.15 kB
-
https://huggingface.co/steveGomez/retinalmodel/resolve/main/README.md
- Command line
-
hf download hf://steveGomez/retinalmodel/README.md
-
curl -L -H "Authorization: Bearer $HF_TOKEN" -o README.md https://huggingface.co/steveGomez/retinalmodel/resolve/main/README.md
1.15 kB
metadata
tags:
- image-to-text
- image-captioning
license: apache-2.0
widget:
- src: >-
https://huggingface.co/datasets/mishig/sample_images/resolve/main/savanna.jpg
example_title: Savanna
Modelo de Imagen a Texto
Este modelo toma una imagen como entrada y genera una descripci贸n en texto como salida. Es ideal para tareas de captioning (creaci贸n de subt铆tulos) en im谩genes y puede usarse en aplicaciones como accesibilidad visual o para agregar descripciones a im谩genes autom谩ticamente.
Uso
Para utilizar este modelo, simplemente proporciona una imagen como entrada. El modelo devolver谩 una descripci贸n en texto.
Ejemplo de c贸digo
Puedes utilizar el siguiente c贸digo en Python con la biblioteca transformers y Pillow para realizar inferencias:
from transformers import pipeline
from PIL import Image
# Cargar el pipeline para imagen a texto
image_to_text = pipeline("image-to-text", model="your-username/your-model-name")
# Cargar una imagen
image = Image.open("path/to/your-image.jpg")
# Obtener el texto de salida
caption = image_to_text(image)
print("Descripci贸n generada:", caption[0]['generated_text'])