Spaces:
Sleeping
Sleeping
T1ckbase
commited on
Commit
·
82cdaef
1
Parent(s):
77085a3
update
Browse files
main.ts
CHANGED
@@ -20,18 +20,18 @@ Deno.serve({ port: 7860 }, async () => {
|
|
20 |
async function main() {
|
21 |
const files = await getFilesInDirectory('./images');
|
22 |
console.info('files:', files.length);
|
23 |
-
if (files.length >=
|
24 |
const repo: hub.RepoDesignation = { type: 'dataset', name: REPO_ID };
|
25 |
const result = await hub.uploadFiles({
|
26 |
repo,
|
27 |
accessToken: HUGGINGFACE_ACCESS_TOKEN,
|
28 |
files: files.map((file) => ({
|
29 |
-
path:
|
30 |
content: new Blob([Deno.readFileSync(`./images/${file}`)]),
|
31 |
})),
|
32 |
});
|
33 |
console.log(result);
|
34 |
-
emptyDirSync('./images');
|
35 |
}
|
36 |
|
37 |
// const prompt = `Photorealistic rendering, hyper-detailed textures, cinematic lighting with volumetric effects, sharp focus with shallow depth of field, subtle chromatic aberration, high dynamic range, meticulous surface imperfections, natural color grading, ultra-high resolution, capturing nuanced light and shadow play, emphasizing tactile qualities, ambient occlusion, advanced ray tracing, realistic lens flares, precise material properties, capturing the essence of observed reality. ` +
|
@@ -56,6 +56,6 @@ while (true) {
|
|
56 |
await main();
|
57 |
} catch (e) {
|
58 |
console.error(e);
|
59 |
-
delay(10000);
|
60 |
}
|
61 |
}
|
|
|
20 |
async function main() {
|
21 |
const files = await getFilesInDirectory('./images');
|
22 |
console.info('files:', files.length);
|
23 |
+
if (files.length >= 1) {
|
24 |
const repo: hub.RepoDesignation = { type: 'dataset', name: REPO_ID };
|
25 |
const result = await hub.uploadFiles({
|
26 |
repo,
|
27 |
accessToken: HUGGINGFACE_ACCESS_TOKEN,
|
28 |
files: files.map((file) => ({
|
29 |
+
path: `images/${file}`,
|
30 |
content: new Blob([Deno.readFileSync(`./images/${file}`)]),
|
31 |
})),
|
32 |
});
|
33 |
console.log(result);
|
34 |
+
// emptyDirSync('./images');
|
35 |
}
|
36 |
|
37 |
// const prompt = `Photorealistic rendering, hyper-detailed textures, cinematic lighting with volumetric effects, sharp focus with shallow depth of field, subtle chromatic aberration, high dynamic range, meticulous surface imperfections, natural color grading, ultra-high resolution, capturing nuanced light and shadow play, emphasizing tactile qualities, ambient occlusion, advanced ray tracing, realistic lens flares, precise material properties, capturing the essence of observed reality. ` +
|
|
|
56 |
await main();
|
57 |
} catch (e) {
|
58 |
console.error(e);
|
59 |
+
await delay(10000);
|
60 |
}
|
61 |
}
|