Skip to main content

Garf implementation for media tagger

Project description

garf for Media Tagging

garf-media-tagging simplifies interaction with media_tagging library via SQL queries and can be used with garf framework.

Prerequisites

Installation

pip install garf-media-tagging

Usage

Run via CLI

Install garf-executors package to run queries via CLI (pip install garf-executors).

garf <PATH_TO_QUERIES> --source media-tagging \
  --output <OUTPUT_TYPE> \
  --source.endpoint=MEDIA_TAGGING_API_ENDPOINT_URL

where:

Available source parameters

name values comments
endpoint http endpoint when media-tagging API is running
db-uri Optional connection string to DB where tagging results can be found

Queries for Media Tagging API

SELECT
  media_url,
  content.tags[].name AS tags
FROM tag
WHERE
  media_type = 'image'
  AND tagger_type = 'gemini'
  AND media_path IN ({media})

Resources

  • tag - identifies tags (pair name: score) uniquely defining media.
  • description - custom description of media; usually fine-tuned via custom_prompt parameter.

Filters

  • media_type - Required, one of: image, youtube_video, webpage, text, video.
  • tagger_type - Tagger used to identify tags / descriptions.
  • media_path - location of media.
  • tagging_options - optional parameters to finetune tagging.
    • n_tags - number of tags to return.
    • tags - custom tags to find in the media.
    • custom_prompt - prompt to send to LLM.

Fields

You can extract one of the following elements from reach row of API response.

  • media_type
  • media_url
  • identifier
  • processed_at
  • content
    • text for description
    • {name, score} for tag
  • hash

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

garf_media_tagging-0.0.4.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

garf_media_tagging-0.0.4-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file garf_media_tagging-0.0.4.tar.gz.

File metadata

  • Download URL: garf_media_tagging-0.0.4.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.4

File hashes

Hashes for garf_media_tagging-0.0.4.tar.gz
Algorithm Hash digest
SHA256 2ea6c94e9e74acd7cd4251aa9c06db5ab015421bb934352e32db8292be352e8c
MD5 90ea30f1f6b5829207d100d55e449bc8
BLAKE2b-256 403f064c6c68e3511cf10a0c0c08877478fa1384115a4f1bf29e604f74712e6b

See more details on using hashes here.

File details

Details for the file garf_media_tagging-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for garf_media_tagging-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 49d52573ebf997f3b936b445bde412eea3c725b68ef863af7ef8ebf25bf51c13
MD5 6cdd84941b4ed77334fea38ea5f0e3af
BLAKE2b-256 d7e07ebc0238449d09c3cebcd6d7d0691df1c9379f0fe86d07c15b7c8c4d337f

See more details on using hashes here.

Supported by

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