TranslateBooksWithLLMs is a full-stack web application for translating eBooks (EPUB, DOCX, TXT, SRT) using multiple LLM providers (Ollama, OpenAI, Gemini, Mistral, DeepSeek, Poe, OpenRouter, NVIDIA NIM, LiteLLM). The architecture is a Flask server with Socket.IO for real-time progress streaming, a JavaScript SPA frontend with i18n support across 7 locales, and a SQLite-based checkpoint/resume system for interrupted translations. The core pipeline extracts content with HTML/XML placeholder preservation, chunks text using tiktoken-aware splitting, translates via configurable LLM providers with multi-phase fallback (LLM → token alignment → original), and reconstructs the output file. Additional features include glossary management with NER-based term suggestion, style extraction from source text, TTS generation via Edge-TTS and Chatterbox, and a comprehensive benchmark framework for evaluating translation quality across 35+ languages. The codebase demonstrates strong engineering with clean abstractions (adapter pattern for formats, factory pattern for LLM providers, generic orchestrator for translation pipeline), extensive testing (unit, integration, characterization with golden snapshots, e2e), and several genuinely reusable components. Notable patterns include a token-aware chunker with exact reassembly, an API key pool with round-robin rotation on 429 responses, an ordered concurrent executor that preserves chunk ordering, a retry manager with exponential backoff and circuit breaker, and a placeholder system for preserving HTML/XML structure during LLM translation. The benchmark subsystem and prompt optimization tool are supporting features that add research value but are secondary to the core application purpose.
This repository implements an end-to-end predictive modeling pipeline for Premier League football match outcomes (home win, draw, away win). It ingests raw match statistics from the api-football.com REST API, processes JSON data into structured DataFrames, engineers features using rolling averages (5- and 10-game windows) and team-vs-opponent differentials, trains multiple classifiers (Random Forest, SVM, KNN, MLP) with hyperparameter tuning, and serves live predictions via a Flask web application. The dominant character is data research: the primary deliverable is a set of trained models and an analytical pipeline, with the web server being a secondary deployment artifact. The best-performing model is a Random Forest achieving ~50-51% test accuracy, demonstrating that football outcomes are modestly predictable from historical statistics. The codebase includes modular helper modules for feature engineering, data scaling, and evaluation plotting that are reusable for other sports or time-series classification tasks. However, the project suffers from hardcoded absolute paths, outdated dependencies (Python 3.7, sklearn 0.23.1), plain-text API keys in the repository, and a static dataset that will drift over time.
The repository is a simple Flask web application demonstrating interaction with the Google Gemini API for text and multimodal chat. It provides a UI for sending text messages and uploading images, maintaining a chat session via the Gemini API and streaming responses using Server-Sent Events. The architecture is monolithic with backend logic in app.py, served frontend static files, and a single HTML template. Key endpoints include '/' for the main page, '/upload' for file handling, '/chat' for message reception, and '/stream' for response streaming. While functional for demonstration, the application relies on global variables for state management (chat session, pending message, pending image), making it unsuitable for production multi-threaded environments without modification. The code is straightforward and serves as an educational starting point for Gemini API integration, but lacks reusable components due to tight coupling and simplicity-focused design. Dependencies are current, and the repository shows recent maintenance activity.