File size: 1,247 Bytes
a72140d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# 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"`