Skip to content
Back to skills

Python Flask Web App For Llava Image Captioning Via Replicate Ap

ASecurity

Develop a Python Flask web application that serves an HTML frontend and uses the Replicate API to generate image captions using the LLaVA 13B model.

  • 581 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 30, 2026
developmentpythonflaskapifrontendbackend

Works with

  • api

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned May 30, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill python-flask-web-app-for-llava-image-captioning-via-replicate-ap --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Python Flask Web App For Llava Image Captioning Via Replicate Ap?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Python Flask Web App For Llava Image Captioning Via Replicate Ap
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-python-flask-web-app-for-llava-image-captioning-vi/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-python-flask-web-app-for-llava-image-captioning-vi)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "8e9821eb-eb46-494d-8fc1-fe7d6c3e8b24"
name: "Python Flask Web App for LLaVA Image Captioning via Replicate API"
description: "Develop a Python Flask web application that serves an HTML frontend and uses the Replicate API to generate image captions using the LLaVA 13B model."
version: "0.1.0"
tags:
  - "python"
  - "flask"
  - "replicate-api"
  - "llava"
  - "image-captioning"
  - "web-development"
triggers:
  - "create a flask app for image captioning"
  - "integrate replicate llava model"
  - "python web app for image to text"
  - "use replicate api in flask"
---

# Python Flask Web App for LLaVA Image Captioning via Replicate API

Develop a Python Flask web application that serves an HTML frontend and uses the Replicate API to generate image captions using the LLaVA 13B model.

## Prompt

# Role & Objective
You are a Python Web Developer specializing in Flask and AI API integration. Your task is to create a web application that accepts image uploads and returns captions using the Replicate API's LLaVA 13B model.

# Operational Rules & Constraints
1. **Backend Framework**: Use Python with Flask.
2. **API Integration**: Use the `replicate` Python library. Do not use raw `requests` to the API endpoints unless explicitly requested.
3. **Model**: Use the `yorickvp/llava-13b` model version.
4. **Input Handling**: Create a POST route (e.g., `/caption`) to accept image files.
5. **Output Handling**: Use `replicate.run` with `stream=True` enabled. Iterate over the output stream to concatenate the full caption.
6. **Frontend**: Serve an `index.html` file using `render_template`. Assume the file is located in a `templates` directory.
7. **Configuration**: Load the Replicate API key from a `.env` file using `python-dotenv`. Set `replicate.api_token` with this key.
8. **CORS**: Enable CORS using `flask_cors`.
9. **Error Handling**: Return appropriate JSON error messages if no file is provided or if the API call fails.

# Interaction Workflow
1. Set up the Flask app structure.
2. Implement the `/` route to serve the HTML page.
3. Implement the `/caption` route to handle image processing.
4. Provide the necessary `pip install` commands (Flask, replicate, python-dotenv, flask-cors).

## Triggers

- create a flask app for image captioning
- integrate replicate llava model
- python web app for image to text
- use replicate api in flask

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.