- Table of Contents
- Overview
- Features
- Project Structure 4.1. Project Index
- Getting Started 5.1. Prerequisites 5.2. Installation 5.3. Usage
- Contributing
- License
- Acknowledgments
A powerful text summarizer built on Googleβs pretrained T5-large (via HuggingFace).
This is the backend-focused version of Kanzeon, designed for the UNRAM S-Cube Hackathon 2025.
Utilizes your GPU if CUDA is available, and the CUDA version of Pytorch is installed.
-
π General Summarization
Leverages T5-large to condense any text into clear, concise summaries. -
π LoRA Adapter Load & Save
Quickly load previously fine-tuned adapters or persist new ones without retraining the full model. -
π Status Checks
/kanzeon/statusendpoint shows service health, device type, and VRAM usage. -
π‘οΈ Out of Memory Handling
Auto-falls back to CPU on GPU OOM, then self-heals back to GPU when memory frees up. -
π Multilingual Support
Auto-detects language, translates to English for summarization, then back to the original language.
βββ Kanzeon-Backend/
βββ Dockerfile
βββ LICENSE
βββ README.md
βββ backend.py
βββ examples
β βββ example.pdf
β βββ mock_data.json
β βββ mock_data2.json
β βββ mock_data3.json
βββ frontend.py
βββ img
β βββ Kanzeon-Banner-Final.jpg
β βββ Kanzeon1x1-Circle.png
β βββ Kanzeon1x1-Erased.png
β βββ Kanzeon1x1.jpg
βββ kanzeon_adapter
β βββ README.md
β βββ adapter_config.json
β βββ adapter_model.safetensors
βββ mock_commands.txt
βββ requirements.txt
βββ test
βββ check_dir.py
βββ test.pyKANZEON-BACKEND/
__root__
β¦Ώ __root__
File Name Summary Dockerfile Contains the Dockerfile used to containerize the Kanzeon API and its runtime dependencies. mock_commands.txt Lists sample cURL commands and usage examples for testing all Kanzeon endpoints. LICENSE The MIT License governing usage, modification, and distribution of this project. requirements.txt Specifies all required Python packages and their versions for both the backend and frontend. frontend.py Streamlit application that provides a user interface to interact with the Kanzeon API. backend.py Main Quart-based server implementation defining the Kanzeon class, routes and summarization logic.
test
β¦Ώ test
File Name Summary check_dir.py A two-line script to find the location of the installed models from HuggingFace. test.py Initial testing script for the pipeline (no routes implemented).
kanzeon_adapter
β¦Ώ kanzeon_adapter
File Name Summary adapter_config.json JSON file containing the LoRA adapter configuration parameters used for fine-tuning. adapter_model.safetensors Binary file storing the fine-tuned LoRA adapter weights.
examples
β¦Ώ examples
File Name Summary mock_data.json Sample JSON payload for a basic text summarization request #1. mock_data2.json Sample JSON payload for a basic text summarization request #2. mock_data3.json Sample JSON payload for a basic text summarization request #3.
This project requires the following dependencies:
- Programming Language: Python
- Package Manager: Pip
- Container Runtime: Docker
Build Kanzeon-Backend from the source and intsall dependencies:
-
Clone the repository:
β― git clone https://github.com/Schryzon/Kanzeon-Backend
-
Navigate to the project directory:
β― cd Kanzeon-Backend -
(Optional) Create & activate a virtualenv (if you plan to use pip):
β― python3 -m venv .venv β― source .venv/bin/activate -
Install the dependencies:
Using Docker (Recommended):
Make sure you have Docker Engine, Docker Compose, and the NVIDIA Container Toolkit (for GPU support) installed.
i. With GPU Support
β― docker-compose up --build
ii. Without GPU Support
β― docker build -t Schryzon/Kanzeon-Backend .Using pip:
i. With GPU Support
β― pip install -r requirements-cuda.txt
ii. Without GPU Support
β― pip install -r requirements-nocuda.txt
Run the project with:
Using Docker:
β― docker run -it Schryzon/Kanzeon-BackendUsing pip:
β― python backend.py
β― streamlit run frontend.py --server.port=8501 --server.address=0.0.0.0- π¬ Join the Discussions: Share your insights, provide feedback, or ask questions.
- π Report Issues: Submit bugs found or log feature requests for the
Kanzeon-Backendproject. - π‘ Submit Pull Requests: Review open PRs, and submit your own PRs.
Contributing Guidelines
- Fork the Repository: Start by forking the project repository to your github account.
- Clone Locally: Clone the forked repository to your local machine using a git client.
β― git clone https://github.com/Schryzon/Kanzeon-Backend
- Create a New Branch: Always work on a new branch, giving it a descriptive name.
β― git checkout -b new-feature-x
- Make Your Changes: Develop and test your changes locally.
- Commit Your Changes: Commit with a clear message describing your updates.
β― git commit -m 'Implemented new feature!' - Push to github: Push the changes to your forked repository.
β― git push origin new-feature-x
- Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.
- Review: Once your PR is reviewed and approved, it will be merged into the main branch. Congratulations on your contribution!
Kanzeon-backend is protected under the MIT LICENSE License. For more details, refer to the LICENSE file.
- Thanks to
SeliaandXelisafor teaching me how to make this! β€οΈ
