--- title: BitNet Text Summarizer emoji: 📝 colorFrom: purple colorTo: indigo sdk: docker app_port: 8501 pinned: false short_description: Streamlit summarizer using microsoft/bitnet-b1.58-2B-4T --- # 📝 BitNet Text Summarizer (Streamlit) An open‑source text summarizer running on **microsoft/bitnet-b1.58-2B-4T** with a map‑reduce strategy for long inputs. Deployed on **Hugging Face Spaces** using **Docker + Streamlit**. ## Features - **BitNet (local)** inference inside the Space (GPU recommended) - **HF Inference API fallback** (optional) if you provide `HF_TOKEN` - **Map‑Reduce** summarization for long documents - Adjustable generation parameters (temperature, top_p, token budgets) ## Quickstart 1. Create/Duplicate a Space with **SDK: Docker**. 2. Add files from this portfolio: `Dockerfile`, `requirements.txt`, `README.md`, and `src/` folder. 3. In **Settings → Hardware**, pick a **GPU** for faster startup (CPU works but is slower). 4. (Optional) Add a repo secret `HF_TOKEN` to enable the fallback engine. 5. Open the app, paste text, and click **Summarize**. ## Local Dev (optional) ```bash python -m venv .venv && source .venv/bin/activate # Windows: .venv\Scripts\activate pip install -r requirements.txt streamlit run src/streamlit_app.py