How lur4n/classificador-agronews works
This is a stateless Python library for classifying agribusiness news and generating optional short summaries. An integrating application supplies a validated news item and optional allowed categories to the classifier; it calls Gemini for a schema-constrained result, then validates the returned JSON as a Pydantic result model. The README also documents Django and basic-use integrations. The source excerpts show the classifier and models, but not the example implementations.
Main entry points: classificador.py News classifier · models.py Pydantic models
Components 4
Other components
- Integrating app
- News classifier
classificador_agronews/classificador.py - Pydantic models
classificador_agronews/models.py - Google Gemini
Connections 7
- Integrating app → News classifier: submits news
- Integrating app → Pydantic models: builds input
- News classifier → Pydantic models: uses schema
- News classifier → Google Gemini: requests analysis
- Google Gemini → News classifier: returns JSON
- News classifier → Pydantic models: validates result
- News classifier → Integrating app: returns classification