Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -226,9 +226,9 @@ def build_space(file_content,file_name,repo_name=None,token=None):
|
|
226 |
|
227 |
try:
|
228 |
api_url = f'https://huggingface.co/api/spaces/{model_id}'
|
229 |
-
t_link3= f"https://{repo_name.replace('/','-').replace('_','-')}.static.hf.space/masto.html"
|
230 |
-
t_link2= f"https://{repo_name.replace('/','-').replace('_','-')}.static.hf.space/gab.html"
|
231 |
-
t_link = f"https://{repo_name.replace('/','-').replace('_','-')}.static.hf.space/main.html"
|
232 |
|
233 |
########## norm
|
234 |
|
@@ -237,7 +237,7 @@ def build_space(file_content,file_name,repo_name=None,token=None):
|
|
237 |
|
238 |
api.upload_file(
|
239 |
path_or_fileobj="main.html",
|
240 |
-
path_in_repo="main.html",
|
241 |
repo_id=repo_name,
|
242 |
token=token,
|
243 |
repo_type="space",
|
@@ -247,7 +247,7 @@ def build_space(file_content,file_name,repo_name=None,token=None):
|
|
247 |
|
248 |
api.upload_file(
|
249 |
path_or_fileobj="main.html",
|
250 |
-
path_in_repo="gab.html",
|
251 |
repo_id=repo_name,
|
252 |
token=token,
|
253 |
repo_type="space",
|
@@ -256,7 +256,7 @@ def build_space(file_content,file_name,repo_name=None,token=None):
|
|
256 |
|
257 |
api.upload_file(
|
258 |
path_or_fileobj="main.html",
|
259 |
-
path_in_repo="masto.html",
|
260 |
repo_id=repo_name,
|
261 |
token=token,
|
262 |
repo_type="space",
|
|
|
226 |
|
227 |
try:
|
228 |
api_url = f'https://huggingface.co/api/spaces/{model_id}'
|
229 |
+
t_link3= f"https://{repo_name.replace('/','-').replace('_','-')}.static.hf.space/{file_name}-masto.html"
|
230 |
+
t_link2= f"https://{repo_name.replace('/','-').replace('_','-')}.static.hf.space/{file_name}-gab.html"
|
231 |
+
t_link = f"https://{repo_name.replace('/','-').replace('_','-')}.static.hf.space/{file_name}-main.html"
|
232 |
|
233 |
########## norm
|
234 |
|
|
|
237 |
|
238 |
api.upload_file(
|
239 |
path_or_fileobj="main.html",
|
240 |
+
path_in_repo=f"{file_name}-main.html",
|
241 |
repo_id=repo_name,
|
242 |
token=token,
|
243 |
repo_type="space",
|
|
|
247 |
|
248 |
api.upload_file(
|
249 |
path_or_fileobj="main.html",
|
250 |
+
path_in_repo=f"{file_name}-gab.html",
|
251 |
repo_id=repo_name,
|
252 |
token=token,
|
253 |
repo_type="space",
|
|
|
256 |
|
257 |
api.upload_file(
|
258 |
path_or_fileobj="main.html",
|
259 |
+
path_in_repo=f"{file_name}-masto.html",
|
260 |
repo_id=repo_name,
|
261 |
token=token,
|
262 |
repo_type="space",
|