Skip to content

vpakarinen2/llm-text-gradio-webui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LLM Gradio WebUI (text + RAG).

A Gradio web interface for text generation (Gemma3 4B as a default model).

Screenshots

Chat Interface RAG Chat Interface

Requirements

  • NVIDIA GPU (8GB+ VRAM)
  • Python 3.11+
  • CUDA 12.1+

Installation

  1. Clone the repository:
git clone https://github.com/vpakarinen2/llm-text-gradio-webui.git
cd llm-text-gradio-webui
  1. Create/activate virtual environment:
python -m venv .venv

# Windows
.venv\Scripts\activate

# Linux/Mac
source .venv/bin/activate
  1. Install PyTorch with CUDA:
pip install torch --index-url https://download.pytorch.org/whl/cu121
  1. Install dependencies:
pip install -r requirements.txt --no-deps
  1. Create .env file:
EMBED_MODEL_ID=sentence-transformers/all-MiniLM-L6-v2
GRADIO_ANALYTICS_ENABLED=False
MAX_NEW_TOKENS=128
DEVICE=cuda

Hugging Face Token

  1. Log in to Hugging Face
  2. Create an access token (Settings → Access Tokens).
  3. Log in:
huggingface-cli login

Usage

python -m app.server

Author

Ville pakarinen (@vpakarinen2)