Skip to content
项目

关于

使用 Gradio 构建的聊天机器人,基于本地运行的开源 DeepSeek-R1 模型。

人工智能与机器学习

这些数字如何统计

可以做什么

  • 🐍 Python Expert
  • 🐞 Debugging Assistant
  • 📝 Code Documentation
  • 💡 Solution Design

实测星标增长

24小时
0
7天
0
15天
0
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

🧠 DeepSeek Code Companion

DeepSeek Code Companion Interface

🚀 Overview

DeepSeek Code Companion is an AI-powered coding assistant that runs completely locally on your machine. Built with Gradio and powered by the DeepSeek-r1 language model through Ollama, it provides intelligent coding assistance, debugging help, and programming guidance.

✨ Features

  • 🐍 Python Expert
  • 🐞 Debugging Assistant
  • 📝 Code Documentation
  • 💡 Solution Design
  • 🏃‍♂️ Runs 100% locally
  • 🔒 Privacy-focused

🛠️ Prerequisites

Before running the app, make sure you have:

  1. Python 3.8+ installed on your system
  2. Ollama installed from ollama.com
  3. The DeepSeek model pulled (instructions below)

📦 Installation

  1. Clone the repository bash git clone https://github.com/Rizwankaka/deepseek-r1-chat.git

cd deepseek-r1-chat

  1. Install dependencies
pip install -r requirements.txt
  1. Download the DeepSeek model using Ollama
ollama pull deepseek-r1:1.5b

🚀 Running the App

  1. Start Ollama (if not already running)
ollama serve
  1. Launch the app
python app.py
  1. Open your browser and navigate to:
http://127.0.0.1:7860

💻 Usage

  1. Select your preferred model version from the dropdown (1.5b or 3b)
  2. Type your coding question in the chat input
  3. Get instant, locally-processed responses for your coding queries!

🛠️ Built With

📝 Requirements

gradio
langchain
langchain-core
langchain-ollama

🤝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

📜 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • DeepSeek team for the amazing model
  • Ollama team for making local LLMs accessible
  • LangChain team for the fantastic framework

⭐ If you found this project helpful, please consider giving it a star!

📸 Screenshot

App Screenshot

🔥 Key Features Explained

Python Expertise

The DeepSeek model is specifically fine-tuned for Python programming, offering:

  • Code completion
  • Bug fixing
  • Best practices suggestions
  • Performance optimization tips

Debugging Assistant

  • Strategic print statement suggestions
  • Error analysis
  • Step-by-step problem solving
  • Runtime error debugging

Code Documentation

  • Automatic docstring generation
  • Code explanation
  • Comment suggestions
  • Documentation best practices

Solution Design

  • Architecture recommendations
  • Design patterns
  • Code organization
  • Scalability considerations

🚫 Common Issues & Solutions

  1. Ollama Connection Error

    Solution: Ensure Ollama is running with 'ollama serve'
    
  2. Model Not Found

    Solution: Run 'ollama pull deepseek-r1:1.5b'
    
  3. Port Already in Use

    Solution: Change the port in app.launch(server_port=XXXX)
    

💡 Tips for Best Results

  1. Be specific in your questions
  2. Provide context when asking about code
  3. Use the 1.5b model for faster responses
  4. Use the 3b model for more complex tasks

🔄 Updates & Maintenance

Stay updated with the latest features:

git pull origin main
pip install -r requirements.txt

Made with ❤️ by Rizwan Rizwan, for the community

探索相关项目

加载中…