Kuki is a local, CPU-first study assistant built in Streamlit. It turns raw notes into structured study material for learners who want cleaner revision sheets from messy inputs.
- Extracts text from pasted notes, PDFs, DOCX files, PPTX files, and note images.
- Rewrites notes in
SimpleorComplexlearning modes. - Supports strict extraction-only mode or a fill-gaps mode.
- Produces structured output with definitions, main points, explanations, examples, mistakes, questions, and summary.
- Runs locally with a GGUF model through
llama.cppwhen available. - Falls back to a structured extraction view if the local model is not set up yet.
From the project folder:
cd C:\Users\HP\OneDrive\Documents\GitHub\kukiai
py -3.11 -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
pip install -r requirements.txt
streamlit run app.pyStreamlit will print a local URL, usually:
http://localhost:8501
Open that URL in your browser.
The app entry point is app.py. Do not run kuki/chat_page.py from inside the kuki folder unless you are debugging that page directly.
If your project is inside OneDrive, use the helper script instead:
cd C:\Users\HP\OneDrive\Documents\GitHub\kukiai
.\run_kuki.ps1The script runs Streamlit from your user folder while pointing it back to this app. That avoids broken OneDrive placeholder reads from .streamlit/config.toml.
The helper script skips dependency installation during normal launches so the app opens faster. If you change requirements.txt, run:
.\run_kuki.ps1 -InstallKuki needs a local GGUF model before it can generate full AI rewrites. Without a model, the app still opens and shows a structured extraction fallback.
- Put a GGUF model file in
models/llm/. - Create or update
.env.localwith your model path:
LLM_MODEL_PATH=.\models\llm\model.gguf
LLM_N_THREADS=4
LLM_N_CTX=4096
LLM_MAX_TOKENS=900- Restart Streamlit after changing
.env.local.
For a first CPU test, use a small quantized instruct model such as a 1B-3B GGUF file. Larger models may work, but they will be slower on CPU.
Image uploads use local OCR through rapidocr-onnxruntime. If OCR is not installed or cannot load, Kuki will still run, but image extraction will show as unavailable in the sidebar.
- Kuki uses
n_gpu_layers=0, so inference stays on CPU. - Image OCR is local too when
rapidocr-onnxruntimeis installed. - On Python 3.13, install a compatible
llama-cpp-pythonbuild manually or use Python 3.11 for the smoothest setup.
After setup, you usually only need:
cd C:\Users\HP\OneDrive\Documents\GitHub\kukiai
.\.venv\Scripts\Activate.ps1
streamlit run app.pyIf Streamlit shows OSError: [Errno 22] Invalid argument while reading config, run:
cd C:\Users\HP\OneDrive\Documents\GitHub\kukiai
.\run_kuki.ps1If you see ModuleNotFoundError: No module named 'kuki', you are probably running a file from inside the kuki package. Go back to the project root and run streamlit run app.py, or use .\run_kuki.ps1.
- If PowerShell blocks activation, run
Set-ExecutionPolicy -Scope CurrentUser RemoteSignedonce, then activate.venvagain. - If
llama-cpp-pythonfails to install on Python 3.13, create the virtual environment with Python 3.11. - If Kuki says no model is found, check that
LLM_MODEL_PATHpoints to the exact.gguffile. - If image OCR is unavailable, rerun
pip install -r requirements.txtinside the active virtual environment. - If Streamlit fails while reading
.streamlit/config.toml, use.\run_kuki.ps1or move the project outside OneDrive.
Built by Mark Chweya.
MIT License.