This project is a minimal example of using DeepSeek's local model for chatbot responses. Its purpose is to demonstrate just how inefficient DeepSeek can be when compared to OpenAI's models—and why many developers continue to choose OpenAI.
Note:
This project is for educational purposes only. It highlights the performance and response quality differences between DeepSeek and OpenAI.
- Quick & Simple Setup: Get a working chatbot in minutes.
- Flask Web Interface: Chat with the model using your browser.
- Clean Output: Only the final answer is shown (no internal reasoning).
- Educational Comparison: See firsthand how DeepSeek falls short compared to OpenAI.
- Python 3.8 or higher
- pip
Optional: A CUDA-capable GPU if you want to speed up model inference.
-
Clone the Repository:
git clone https://github.com/yourusername/deepseek-vs-openai.git cd deepseek-vs-openai -
Install the Dependencies:
pip install -r requirements.txt
-
Download the DeepSeek Model:
This will automatically download the model via Hugging Face (please be patient as it might take a while):
python deepseek_model.py
Run the following command:
python app.pyThen, open your browser and navigate to http://127.0.0.1:5000/ to start chatting.
If you prefer a command-line test of the chatbot, run:
python main.pyThis script generates a response to a sample query and prints the output.
- Simplified Prompt: The chatbot builds a prompt that includes any previous conversation history and instructs the model to output only a final answer (prefixed with
Final Answer:) without internal reasoning. - Post-Processing: The application extracts and displays only the final answer.
- Token Limit: Although the model can use up to 12,000 tokens, DeepSeek’s inefficiency may result in shorter or less coherent outputs compared to OpenAI.
Contributions are welcome! Feel free to fork this project and submit a pull request if you have ideas to improve the demo or add new features.
This project is licensed under the MIT License.
Enjoy exploring the differences between DeepSeek and OpenAI!
---