Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 DeepSeek Coder Assistant - AI-Powered Coding Companion

Python Streamlit Ollama DeepSeek License

🎯 Project Overview

A production-ready AI coding assistant built with DeepSeek Coder and Streamlit. This application provides intelligent programming help through a beautiful, responsive web interface with just pure coding expertise!

✨ Live Demo Features

  • 💬 Interactive Chat Interface with message history
  • 🎨 Modern UI with gradient backgrounds and animations
  • ⚡ Real-time Responses from DeepSeek Coder 1.3B model
  • 📝 Code-Specific AI trained on 2 trillion tokens (87% code)
  • 🔒 100% Local - Your code stays on your machine
  • 🧠 Specialized for Programming - Answers only coding questions

🏗️ Architecture & Tech Stack

graph TD
    A[User Question] --> B[Streamlit UI]
    B --> C[Ollama Local LLM]
    C --> D[DeepSeek Coder 1.3B]
    D --> E[Code Response]
    E --> B
    B --> F[(Chat History)]
Loading

Core Technologies

Layer Technology Purpose
Frontend Streamlit Beautiful web UI with zero HTML/CSS
LLM Engine Ollama Local model deployment & management
AI Model DeepSeek Coder 1.3B Specialized code generation & explanation
State Management Streamlit Session Chat persistence across interactions
Environment Python venv Clean dependency isolation

🚀 Key Features Implemented

1. Intelligent Code Assistant

# Example prompts you can ask:
"Explain async/await in Python with examples"
"Write a React component for a todo list"
"Debug this function: def add(a b) return a+b"
"What's the difference between let and var in JavaScript?"
"Create a REST API with Flask"

2. Beautiful UI Components

  • 🎨 Gradient backgrounds with smooth CSS animations
  • 💭 Message bubbles with distinct user/bot styling
  • ⏱️ Timestamps on every message for conversation tracking
  • 🧹 One-click chat history clear button
  • 📱 Responsive design that works on all devices
  • ✨ Hover effects on all interactive elements

3. Production-Ready Features

  • ✅ Comprehensive error handling with graceful fallbacks
  • ✅ Model availability checking before each interaction
  • ✅ Session state management for persistent conversations
  • ✅ Token usage tracking (estimated)
  • ✅ Loading animations during response generation
  • ✅ Temperature control for response creativity

📊 What I Learned

Technical Skills Acquired

Skill Implementation
LLM Integration Connected DeepSeek Coder with Ollama for local deployment
Streamlit Development Created professional web apps with pure Python
Ollama Management Pulled, ran, and managed local LLM models
DeepSeek Coder Leveraged specialized coding AI for programming tasks
Python venv Isolated project dependencies cleanly
UI/UX Design Custom CSS with gradients, animations, and responsive layouts
State Management Session persistence across app reruns
Error Handling Graceful degradation when models aren't available
Async Programming Managed concurrent user requests

Development Practices Learned

  • 📁 Project structure - Organized code for maintainability
  • 🔧 Environment management - Virtual env best practices
  • 📝 Documentation - Clear code comments and user guides
  • 🐛 Debugging - Systematic problem-solving approach
  • 🎨 UI Design - User-centered interface principles
  • 🚀 Deployment - Local deployment strategies

🛠️ Installation & Setup

# 1. Clone the repository
git clone https://github.com/yourusername/deepseek-coder-assistant.git
cd deepseek-coder-assistant

# 2. Create virtual environment
python -m venv .venv

# 3. Activate it (Windows)
.\.venv\Scripts\activate

# 4. Install dependencies
pip install -r requirements.txt

# 5. Pull the DeepSeek model
ollama pull deepseek-coder:1.3b

# 6. Verify the model is installed
ollama list

# 7. Run the app
streamlit run app.py

Requirements File (requirements.txt)

streamlit==1.54.0
ollama==0.6.1
pandas==2.3.3
numpy==2.4.2
pillow==12.1.1
python-dotenv==1.2.1

🎯 Sample Interactions

Python Question

🔐 You: Write a function to check if a string is a palindrome

🤖 Assistant: Here's a Python function to check palindromes:

```python
def is_palindrome(s):
    """
    Check if a string is a palindrome.
    
    Args:
        s (str): Input string to check
    
    Returns:
        bool: True if palindrome, False otherwise
    """
    # Remove non-alphanumeric characters and convert to lowercase
    cleaned = ''.join(c.lower() for c in s if c.isalnum())
    # Compare with its reverse
    return cleaned == cleaned[::-1]

# Test cases
print(is_palindrome("A man, a plan, a canal: Panama"))  # True
print(is_palindrome("race a car"))  # False
print(is_palindrome("Was it a car or a cat I saw?"))  # True

Time complexity: O(n) where n is the length of the string Space complexity: O(n) for the cleaned string


### **JavaScript Question**

🔐 You: Explain async/await with an example

🤖 Assistant: Async/await in JavaScript is syntactic sugar over Promises that makes asynchronous code look and behave more like synchronous code...

[Detailed explanation with multiple examples]


### **React Question**

🔐 You: Create a simple counter component in React

🤖 Assistant: Here's a basic counter component using React hooks:

import React, { useState } from 'react';

function Counter() {
    const [count, setCount] = useState(0);
    
    return (
        <div style={{ textAlign: 'center', padding: '20px' }}>
            <h2>Counter: {count}</h2>
            <button onClick={() => setCount(count + 1)}>Increment</button>
            <button onClick={() => setCount(count - 1)}>Decrement</button>
            <button onClick={() => setCount(0)}>Reset</button>
        </div>
    );
}

export default Counter;

---

## 📈 **Performance Metrics**

| Metric | Value |
|--------|-------|
| **Model Size** | 776 MB (DeepSeek Coder 1.3B) |
| **Response Time** | 2-5 seconds average |
| **Context Window** | 4096 tokens |
| **Memory Usage** | ~1.5 GB RAM |
| **Languages Supported** | 80+ programming languages |
| **Training Data** | 2 trillion tokens (87% code) |
| **Accuracy** | 45.1% on HumanEval benchmark |

---

## 🚧 **Future Enhancements**

- [ ] **Multi-model Support** - Switch between different coding AIs
- [ ] **Code Execution** - Run generated code in a sandbox
- [ ] **Export Conversations** - Save chats to markdown files
- [ ] **Dark Mode** - Theme toggle for night coding
- [ ] **Code Highlighting** - Better syntax highlighting in responses
- [ ] **Voice Input** - Speech-to-text for hands-free coding
- [ ] **Favorite Prompts** - Save commonly used questions
- [ ] **Code Explanation Mode** - Toggle between brief/detailed explanations

---


**Built with ❤️ using Python, Streamlit, and DeepSeek Coder**

---


## ⚖️ **License**

MIT License - feel free to use this project for learning or commercial purposes!

---

## 🙏 **Acknowledgments**

- [DeepSeek AI](https://deepseek.com/) for releasing an amazing open-source coding model
- [Ollama](https://ollama.ai/) for making local LLM deployment effortless
- [Streamlit](https://streamlit.io/) for the incredible web framework that turns Python into UIs
- The open-source community for continuous inspiration and tools

---

## 📸 **Screenshots**

*![alt text](image.png)*

![alt text](image-1.png)
*Main chat interface with gradient background and message bubbles*





---

*Last Updated: February 17, 2026*

---

## ⭐ **Show Your Support**

If you found this project helpful, please give it a ⭐ on GitHub!

---

**Made with 🧠 + 💻 by [casss20](https://github.com/casss20/Deepseek_coder_assistant)**

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages