paper2code-cli / Agent.md
Leon4gr45's picture
Upload folder using huggingface_hub (part 8)
a72140d verified
|
Raw History Blame
1.25 kB
# Deployment Agent Instructions
This codebase is configured for deployment on Hugging Face Spaces.
## Deployment Configuration
### Target Space
- **Profile:** `Leon4gr45`
- **Space:** `paper2code-cli`
- **Full Identifier:** `Leon4gr45/paper2code-cli`
- **Frontend Port:** `7860`
### SDK
- **SDK:** `docker`
## Mandatory Endpoints
- `/api/health`: Returns HTTP 200 when ready.
- `/api/api-docs`: Documentation of all API endpoints.
## Functional Endpoints
### /api/submit-job
- **Method:** POST
- **Purpose:** Transform a research paper into code and push to GitHub.
- **Request:**
```json
{
"arxivUrl": "https://arxiv.org/abs/2303.08774",
"paperName": "GPT-4 Technical Report",
"repo": "owner/repo"
}
```
- **Response:**
```json
{
"success": true,
"githubUrl": "...",
"branch": "...",
"filesCount": 10
}
```
## Deployment Workflow
To deploy, use:
```bash
hf upload Leon4gr45/paper2code-cli --repo-type=space
```
Monitor logs using:
- Build logs: `curl -N -H "Authorization: Bearer $HF_TOKEN" "https://huggingface.co/api/spaces/Leon4gr45/paper2code-cli/logs/build"`
- Run logs: `curl -N -H "Authorization: Bearer $HF_TOKEN" "https://huggingface.co/api/spaces/Leon4gr45/paper2code-cli/logs/run"`