Spaces:
Runtime error
Runtime error
Download scripts/archive_week.js from Peacemanguy/LLMChoice: direct link, hf CLI and curl.
- Browser
- Download file 783 Bytes
-
https://huggingface.co/spaces/Peacemanguy/LLMChoice/resolve/main/scripts/archive_week.js
- Command line
-
hf download hf://spaces/Peacemanguy/LLMChoice/scripts/archive_week.js
-
curl -L -o archive_week.js https://huggingface.co/spaces/Peacemanguy/LLMChoice/resolve/main/scripts/archive_week.js
783 Bytes
| // scripts/archive_week.js | |
| // This script archives the current leaderboard data for the previous week | |
| // It can be run manually or scheduled to run automatically | |
| const archiver = require('../leaderboard_archiver'); | |
| const moment = require('moment'); | |
| console.log('Starting weekly leaderboard archiving process...'); | |
| console.log(`Current time: ${moment().format('YYYY-MM-DD HH:mm:ss')}`); | |
| try { | |
| // Archive the previous week's data | |
| const weekId = archiver.archiveCurrentWeek(); | |
| console.log(`Successfully archived leaderboard data for week ${weekId}`); | |
| // Reset votes after archiving | |
| archiver.resetLeaderboard(); | |
| console.log('Archiving process completed successfully'); | |
| } catch (error) { | |
| console.error('Error during archiving process:', error); | |
| process.exit(1); | |
| } |