Download file.js from yking21/pro-code: direct link, hf CLI and curl.
- Browser
- Download file 909 Bytes
-
https://huggingface.co/yking21/pro-code/resolve/main/file.js
- Command line
-
hf download hf://yking21/pro-code/file.js
-
curl -L -o file.js https://huggingface.co/yking21/pro-code/resolve/main/file.js
909 Bytes
| async function generateExpertCode(userProblem) { | |
| const response = await fetch( | |
| "https://api-inference.huggingface.co/models/deepseek-ai/deepseek-coder-1.3b-instruct", // موديل كود خفيف وقوي | |
| { | |
| headers: { | |
| "Authorization": "Bearer YOUR_HUGGINGFACE_API_TOKEN", | |
| "Content-Type": "application/json" | |
| }, | |
| method: "POST", | |
| body: JSON.stringify({ | |
| inputs: `System: You are an elite Senior Software Engineer. Follow the 5-step analysis/code protocol.\nUser: ${userProblem}\nAssistant:`, | |
| parameters: { | |
| max_new_tokens: 1024, | |
| temperature: 0.2 // درجة حرارة منخفضة لضمان الدقة وعدم التأليف | |
| } | |
| }), | |
| } | |
| ); | |
| const result = await response.json(); | |
| return result; | |
| } |