Spaces:
Paused
Paused
github-actions[bot]
Sync from GitHub Viciy2023/Qwen2API-A@b372de2fdb435c7fa78fc69c146257a58c842fba
4289eb1 Download src/utils/paths.js from ElionMarks7778/Qwen2API-A: direct link, hf CLI and curl.
- Browser
- Download file 628 Bytes
-
https://huggingface.co/spaces/ElionMarks7778/Qwen2API-A/resolve/main/src/utils/paths.js
- Command line
-
hf download hf://spaces/ElionMarks7778/Qwen2API-A/src/utils/paths.js
-
curl -L -o paths.js https://huggingface.co/spaces/ElionMarks7778/Qwen2API-A/resolve/main/src/utils/paths.js
628 Bytes
| const path = require('path') | |
| const resolvePath = (targetPath, fallbackPath) => { | |
| if (targetPath && targetPath.trim()) { | |
| return path.resolve(targetPath) | |
| } | |
| return path.resolve(fallbackPath) | |
| } | |
| const dataDir = resolvePath(process.env.DATA_DIR, path.join(__dirname, '../../data')) | |
| const cacheDir = resolvePath(process.env.CACHE_DIR, path.join(__dirname, '../../caches')) | |
| const logDir = resolvePath(process.env.LOG_DIR, path.join(__dirname, '../../logs')) | |
| module.exports = { | |
| dataDir, | |
| cacheDir, | |
| logDir, | |
| dataFilePath: path.join(dataDir, 'data.json'), | |
| usageStatsFilePath: path.join(dataDir, 'usage-stats.json') | |
| } | |