rafaelpadilla/coco2017
Viewer β’ Updated β’ 123k β’ 3.27k β’ 30
How to use nomanmanzoor/image-prompt-model with Transformers:
# Use a pipeline as a high-level helper
# Warning: Pipeline type "image-to-text" is no longer supported in transformers v5.
# You must load the model directly (see below) or downgrade to v4.x with:
# 'pip install "transformers<5.0.0'
from transformers import pipeline
pipe = pipeline("image-to-text", model="nomanmanzoor/image-prompt-model") # Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("nomanmanzoor/image-prompt-model", dtype="auto")This is a simple and effective model that generates text prompts from uploaded images using BLIP + Transformers.
It uses Salesforce/blip-image-captioning-base under the hood and is optimized for use with Streamlit.
Upload an image of a mountain and get a prompt like:
βA scenic view of snowy mountains under a clear blue sky.β
from model import ImagePromptModel
model = ImagePromptModel()
result = model.generate_prompt("your_image.jpg")
print(result)
Base model
HuggingFaceTB/SmolLM3-3B-Base