SalimBinYousuf/optimized-deepseek-chatbot
0
AI Chatbot with DeepSeek Integration
This repository contains a powerful AI chatbot built with DeepSeek model integration, featuring advanced capabilities including instruction-following, multi-turn conversations, Markdown rendering, code understanding, and more.
Features
Core AI Features
- Instruction Following: The model follows prompts like ChatGPT
- Multi-turn Conversations: Keeps track of session history for context
- Markdown Support: Renders headings, lists, code blocks, and tables
- Urdu Nastaliq Rendering: Full support for Nastaliq-style Urdu text
- Math & Logic Reasoning: Solves equations and explains steps
- Code Understanding: Writes and explains code with syntax support
- Error Detection: Highlights and fixes errors in code and language
- Text Summarization: Condenses content into concise summaries
- Image Interpretation: Extracts text from images
Frontend UI Features
- Chat Interface: Real-time chat with typing effect and editable responses
- Code Editor: In-browser editor with syntax highlighting and a bash terminal
- File Manager: Upload, download, preview files (PDF, code, images)
- Dark/Light Mode: Toggle themes with Tailwind CSS
- Voice Interaction: Speech-to-text and text-to-speech capabilities
Technology Stack
Backend
- FastAPI: High-performance API framework
- WebSockets: Real-time communication
- PyJWT: Authentication and session management
- Hugging Face Integration: DeepSeek model access
Frontend
- Next.js: React framework for UI
- Tailwind CSS: Utility-first styling
- Monaco Editor: VS Code-like code editor
- React Markdown: Markdown rendering
Deployment
This application is deployed as a Hugging Face Space using Docker.
Getting Started
Prerequisites
- Python 3.10+
- Node.js 20+
- Hugging Face API key
Installation
- Clone the repository
git clone https://huggingface.co/spaces/[your-username]/deepseek-chatbot
cd deepseek-chatbot- Install backend dependencies
cd backend
pip install -r requirements.txt- Install frontend dependencies
cd frontend
npm install- Set up environment variables Create a
.envfile in the root directory with:
HUGGINGFACE_API_KEY=your_api_key_here- Run the application
# Start the backend
uvicorn backend.main:app --reload
# In another terminal, start the frontend
cd frontend
npm run devLicense
MIT
