Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files- app/draw_diagram.py +6 -3
app/draw_diagram.py
CHANGED
@@ -52,9 +52,12 @@ links_dic = {k.lower().replace('_', '-') : v for k, v in links_dic.items()}
|
|
52 |
# huggingface_image = Image.open('style/huggingface.jpg')
|
53 |
|
54 |
def nav_to(value):
|
55 |
-
|
56 |
-
|
57 |
-
|
|
|
|
|
|
|
58 |
|
59 |
# nav_script = """
|
60 |
# <meta http-equiv="refresh" content="0; url='%s'">
|
|
|
52 |
# huggingface_image = Image.open('style/huggingface.jpg')
|
53 |
|
54 |
def nav_to(value):
|
55 |
+
try:
|
56 |
+
url = links_dic[str(value).lower()]
|
57 |
+
js = f'window.open("{url}", "_blank").then(r => window.parent.location.href);'
|
58 |
+
st_javascript(js)
|
59 |
+
except:
|
60 |
+
pass
|
61 |
|
62 |
# nav_script = """
|
63 |
# <meta http-equiv="refresh" content="0; url='%s'">
|