Update src/generation.py
#1
by AkshaySriniv - opened
Implement generation.answer() with flan-t5-base
- Load and cache text2text-generation pipeline (GENERATION_MODEL)
- Build context from ranked chunks, truncating to MAX_CONTEXT_TOKENS
to stay within flan-t5-base's context window - Keep existing RELEVANCE_THRESHOLD fallback guard unchanged
- Replaces stub echo of top chunk
huggingfaceconsumer changed pull request status to merged