krishnakapoor/ai-codemate-brain
0
Deploying Your Free AI Brain
This directory contains the configuration to run Qwen 2.5 Coder 1.5B on Hugging Face Spaces for free.
1. Create a Hugging Face Space
- Go to huggingface.co/spaces.
- Click Create new Space.
- Name:
ai-codemate-brain(or similar). - License:
MIT. - SDK: Select Docker (Blank).
- Hardware: Keep Default (Free: 2 vCPU, 16GB RAM).
- Click Create Space.
2. Deploy the Model
You have two options to deploy the code:
Option A: Upload Files Directly (Easiest)
- In your new Space, go to the Files tab.
- Click Add file -> Upload files.
- Drag and drop the
Dockerfilefrom this folder. - Click Commit changes to main.
- Wait for the "Building" status to finish (this will take a few minutes as it downloads the 2GB model).
- Once "Running", your API URL will be:
https://HUGGINGFACE-USERNAME-SPACE-NAME.hf.space
Option B: Push via Git
- Clone the repository shown in your Space.
- Copy this
Dockerfileinto it. git add Dockerfilegit commit -m "Add Llama 3.2"git push
3. Connect Your App
- Copy your Space's URL (e.g.,
https://username-ai-codemate.hf.space). - Open your project's
.envfile. - Add or update:
AI_SERVICE_URL=https://username-ai-codemate.hf.space