Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -60,7 +60,7 @@ def save_data(t,m,l,n,w,p):
|
|
60 |
|
61 |
im1 = f"{os.getcwd()}/images/{title}_prob.png"
|
62 |
#im2=f"https://{user_name}-{repo_name}.static.hf.space/images/{title}_prob.png"
|
63 |
-
im2=f"https://huggingface.co/spaces/{user_name}/{repo_name}/resolve/main/images/{title}.png"
|
64 |
#im3=f"{make_im.root}/images/{name}_prob.png"
|
65 |
#uid=uuid.uuid4()
|
66 |
with open('template.html','r') as file:
|
@@ -86,7 +86,7 @@ def save_data(t,m,l,n,w,p):
|
|
86 |
repo_type="space",
|
87 |
)
|
88 |
#return f"https://broadfield-a.hf.space/?pdfurl={t}&mod={m}&len={l}&nos={n}&wid={w}&pau={p}"
|
89 |
-
return f"<div><a href='https://f'{user_name}-{repo_name}
|
90 |
def load_html(url):
|
91 |
html=f"""<iframe src="https://docs.google.com/viewer?url={url})&embedded=true" frameborder="0" height="1200px" width="100%"></iframe></div>"""
|
92 |
return html
|
|
|
60 |
|
61 |
im1 = f"{os.getcwd()}/images/{title}_prob.png"
|
62 |
#im2=f"https://{user_name}-{repo_name}.static.hf.space/images/{title}_prob.png"
|
63 |
+
im2=f"https://huggingface.co/spaces/{user_name}/{repo_name}/resolve/main/images/{title}_{rand}.png"
|
64 |
#im3=f"{make_im.root}/images/{name}_prob.png"
|
65 |
#uid=uuid.uuid4()
|
66 |
with open('template.html','r') as file:
|
|
|
86 |
repo_type="space",
|
87 |
)
|
88 |
#return f"https://broadfield-a.hf.space/?pdfurl={t}&mod={m}&len={l}&nos={n}&wid={w}&pau={p}"
|
89 |
+
return f"<div><a href='https://f'{user_name}-{repo_name}.static.hf.space/{title}_{rand}.html' target='_blank'>https://broadfield-a.static.hf.space/{title}_{rand}.html</a></div>"
|
90 |
def load_html(url):
|
91 |
html=f"""<iframe src="https://docs.google.com/viewer?url={url})&embedded=true" frameborder="0" height="1200px" width="100%"></iframe></div>"""
|
92 |
return html
|