Spaces:
Sleeping
Sleeping
update deploy
Browse filesFiles changed (2)
- server.js+26-4
- src/utils/consts.ts+1-1
2 unmodified lines3456678997 unmodified lines1071081091101101111121136 unmodified lines12012112212312412512612712810 unmodified lines1391401411421431441451461471481491501511521531541551561571581591601611401621631421641651661672 unmodified linesimport { fileURLToPath } from "url";import dotenv from "dotenv";import cookieParser from "cookie-parser";import { createRepo, uploadFile, whoAmI } from "@huggingface/hub";import { createRepo, uploadFiles, whoAmI } from "@huggingface/hub";import { InferenceClient } from "@huggingface/inference";import bodyParser from "body-parser";
97 unmodified lines if (!path) { newHtml = html.replace( /<\/body>/, `<p style="text-align: center; font-size: 12px; color: #888; margin-top: 16px;">This website has been generated by <a href="https://enzostvs-deepsite.hf.space" target="_blank">DeepSite</a> <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;"></p></body>` `<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: absolute; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">This website has been generated by <a href="https://enzostvs-deepsite.hf.space" style="color: #fff;" target="_blank" >DeepSite</a> <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;"></p></body>` ); }
6 unmodified lines type: "space", name: path ?? "", };
let readme;
if (!path || path === "") { const { name: username } = await whoAmI({ accessToken: hf_token }); const newTitle = title10 unmodified lines repo, accessToken: hf_token, }); readme = `---title: ${newTitle}emoji: 🚀colorFrom: bluecolorTo: bluesdk: staticpinned: falsetags: - deepsite---
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference`; }
const files = [file]; if (readme) { const readmeFile = new Blob([readme], { type: "text/markdown" }); readmeFile.name = "README.md"; // Add name property to the Blob files.push(readmeFile); } await uploadFile({ await uploadFiles({ repo, file, files, accessToken: hf_token, }); return res.status(200).send({ ok: true, path: repo.name });40 unmodified lines414243444445464740 unmodified lines <span>I'm ready to work,</span><br /> Ask me anything. </h1> <img src="/arrow.svg" class="arrow" /> <img src="https://enzostvs-test-enzo-lol.static.hf.space/arrow.svg" class="arrow" /> <script></script> </body></html>server.js+26-4
src/utils/consts.ts+1-1