Fix logging issues in poetry_generation.log; add warnings for custom vocabulary loading and model file not found errors, and ensure BASE_MODEL_DIR ends with a slash
Refactor GenerateRequest model; remove field aliases for emotional_tone, creative_style, language_variety, and word_repetition, and update validation error messages to match new field names
Enhance model initialization and error handling; implement model path verification, improve logging configuration, and modify startup event for better diagnostics
Update model configuration and enhance initialization logic; adjust BASE_DIR for container, implement model download functionality, and improve health check response
Refactor FastAPI application structure; implement CORS middleware, update model initialization, and enhance poem generation endpoint with new request and response models
Refactor ModelManager and PoetryGenerationService for CPU optimization; enhance model initialization, improve text generation parameters, and implement explicit resource cleanup
Refactor PoetryGenerationService and ModelManager for CPU optimization; update model and tokenizer initialization, simplify prompt templates, and enhance text generation and cleaning processes
Refactor PoetryGenerationService to improve model preloading and poem generation; switch to max_new_tokens for better control and update model name for consistency
Refactor PoetryGenerationService to enhance poem generation; switch to GPT2-medium model, improve prompt templates, and implement output cleaning for better formatting and quality
Refactor PoetryGenerationService and ModelManager for improved resource efficiency; optimize model loading, implement caching, and enhance error handling