title-generator / README.md
oriolgds's picture
Merge branch 'main' of https://huggingface.co/spaces/oriolgds/title-generator
c1bf909 unverified
|
raw
history blame
1.1 kB
metadata
title: Title Generator with Llama 3.2
emoji: πŸ“
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 4.44.0
app_file: app.py
pinned: false
license: mit

Title Generator with Llama 3.2-1B-Instruct

Generate concise titles from text or conversation history using Meta's Llama 3.2-1B-Instruct model.

Features

  • πŸ“ Generate titles from plain text
  • πŸ’¬ Generate titles from conversation history
  • πŸš€ Fast inference with Llama 3.2-1B
  • πŸ”Œ RESTful API support for integration

Setup

  1. Go to your Space settings
  2. Add a new secret: HF_TOKEN with your Hugging Face token
  3. Make sure you have access to meta-llama/Llama-3.2-1B-Instruct (accept the gated model)

API Usage

CURL Example

curl -X POST "https://YOUR-SPACE-URL/call/generate_title" \
  -H "Content-Type: application/json" \
  -d '{"data": ["Your text or conversation here"]}'

Python Example

from gradio_client import Client

client = Client("YOUR-SPACE-URL")
result = client.predict("Your text here", api_name="/generate_title")
print(result)

License

MIT License