Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -49,7 +49,8 @@ def load_data(file):
|
|
49 |
return(lod)
|
50 |
|
51 |
def save_data(t,m,l,n,w,p):
|
52 |
-
|
|
|
53 |
with open('template.html','r') as file:
|
54 |
file_cont=file.read()
|
55 |
file.close()
|
@@ -60,7 +61,7 @@ def save_data(t,m,l,n,w,p):
|
|
60 |
|
61 |
api.upload_file(
|
62 |
path_or_fileobj=buffer,
|
63 |
-
path_in_repo=f"{
|
64 |
repo_id=f'{user_name}/{repo_name}',
|
65 |
token=token,
|
66 |
repo_type="space",
|
|
|
49 |
return(lod)
|
50 |
|
51 |
def save_data(t,m,l,n,w,p):
|
52 |
+
title = m.replace('https://',"").replace('/',"_").replace('.',"_")
|
53 |
+
#uid=uuid.uuid4()
|
54 |
with open('template.html','r') as file:
|
55 |
file_cont=file.read()
|
56 |
file.close()
|
|
|
61 |
|
62 |
api.upload_file(
|
63 |
path_or_fileobj=buffer,
|
64 |
+
path_in_repo=f"{title}.html",
|
65 |
repo_id=f'{user_name}/{repo_name}',
|
66 |
token=token,
|
67 |
repo_type="space",
|