zhuohan-7 commited on
Commit
45b633e
·
verified ·
1 Parent(s): 1441195

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. 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
- url = links_dic[str(value).lower()]
56
- js = f'window.open("{url}", "_blank").then(r => window.parent.location.href);'
57
- st_javascript(js)
 
 
 
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'">