Spaces:
Sleeping
Sleeping
Commit Β·
b4c8380
1
Parent(s): cb5ca94
Update README with full project documentation
Browse files4 unmodified lines56784 unmodified linescolorTo: greensdk: dockerpinned: false---4 unmodified lines567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391404 unmodified linescolorTo: greensdk: dockerpinned: false---# π€ GenAI Toolkit> A powerful, all-in-one Generative AI application combining multiple NLP features into a single, clean interface β powered by LangChain, LangGraph, and Groq LLaMA 3.---## π Features| Feature | Description ||---------|-------------|| π **Language Translation** | Translate text across 20+ languages instantly || π **Text Summarization** | Condense long documents using map-reduce chunking || π **Keyword Extraction** | Extract key topics and phrases from any text || βοΈ **Email Writer** | Generate professional emails and cover letters || π¬ **Chat Assistant** | Multi-turn AI conversations with memory || π **PDF Q&A** | Upload PDFs and ask questions using RAG |---## π οΈ Tech Stack| Layer | Technology ||-------|-----------|| **LLM** | Groq LLaMA 3.3 70B + LLaMA 3.1 8B || **Orchestration** | LangChain + LangGraph || **Vector Store** | FAISS + HuggingFace Embeddings || **UI** | Gradio || **Deployment** | Docker + Hugging Face Spaces |---## ποΈ ArchitectureGenAI-Toolkit/βββ src/β βββ features/β β βββ translation.py # LangChain PromptTemplateβ β βββ summarization.py # Map-Reduce summarizationβ β βββ keyword_extraction.py # Structured output extractionβ β βββ email_writer.py # Email + Cover letter generationβ β βββ pdf_qa.py # RAG pipeline with FAISSβ βββ graphs/β β βββ chat_graph.py # LangGraph conversation graphβ βββ utils/β β βββ llm.py # Groq LLM setupβ β βββ vector_store.py # FAISS vector storeβ βββ app.py # Gradio UIβββ Dockerfileβββ requirements.txt---## π How It Works### Language TranslationUses LangChain `PromptTemplate` with Groq LLaMA 3.1 to translate text between 20+ languages while preserving tone and context.### Text SummarizationImplements **map-reduce chunking** β splits long documents into chunks, summarizes each chunk, then combines into a final summary. Handles documents of any length.### Keyword ExtractionUses structured LLM output to extract the most relevant keywords with context and relevance explanations.### Email & Cover Letter WriterTemplate-driven generation with customizable tone, email type, and recipient details. Cover letter writer tailors content to specific job roles and companies.### Chat AssistantBuilt with **LangGraph StateGraph** β maintains full conversation history across turns using a stateful graph architecture.### PDF Q&AImplements **RAG (Retrieval Augmented Generation)**:1. Upload PDF β extract text with PyMuPDF2. Chunk text with RecursiveCharacterTextSplitter3. Embed chunks with HuggingFace sentence-transformers4. Store in FAISS vector store5. Retrieve top-k relevant chunks per question6. Generate answer with LangGraph agent---## π§ Local Setup```bash# Clone the repogit clone https://github.com/shashankheg/GenAI-Toolkit.gitcd GenAI-Toolkit# Create virtual environmentuv venv.venv\Scripts\activate# Install dependenciesuv pip install -r requirements.txt# Add API key to .envecho "GROQ_API_KEY=your-key-here" > .env# Run the apppython -m src.app```---## π³ Docker```bashdocker build -t genai-toolkit .docker run -p 7860:7860 -e GROQ_API_KEY=your-key genai-toolkit```---## π API Keys- **Groq API** (free) β https://console.groq.com- No OpenAI key required β fully powered by Groq---## π Model Details| Task | Model | Speed ||------|-------|-------|| Translation, Keywords, Email | LLaMA 3.1 8B Instant | ~0.5s || Summarization, Chat, PDF Q&A | LLaMA 3.3 70B Versatile | ~1-2s |---## π¨βπ» Author- HuggingFace: [@shashankheg](https://huggingface.co/shashankheg)
README.md+133-1