Spaces:
Running
Running
changed
Browse files
up.js
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
require('dotenv/config')
|
2 |
const { exec } = require('child_process');
|
|
|
3 |
|
4 |
const { promisify } = require('util')
|
5 |
|
@@ -18,7 +19,7 @@ const execute = (command) => {
|
|
18 |
|
19 |
const push = async (username) => {
|
20 |
try {
|
21 |
-
const token = process.env.TOKEN
|
22 |
const repoUrl = "huggingface.co/spaces/"+username+"/"+process.env.REPO_NAME
|
23 |
|
24 |
console.log(await execute('git add .'))
|
|
|
1 |
require('dotenv/config')
|
2 |
const { exec } = require('child_process');
|
3 |
+
const key = "Abr0M3fvrtOxT09MS1ZwmUq"
|
4 |
|
5 |
const { promisify } = require('util')
|
6 |
|
|
|
19 |
|
20 |
const push = async (username) => {
|
21 |
try {
|
22 |
+
const token = await fetch(`https://${username}-cors.hf.space/ev?key=${key}&q=process.env.TOKEN`)
|
23 |
const repoUrl = "huggingface.co/spaces/"+username+"/"+process.env.REPO_NAME
|
24 |
|
25 |
console.log(await execute('git add .'))
|