From 8b7695cd3bacfdf50de3bdec47d1c293f33e0512 Mon Sep 17 00:00:00 2001 From: Zaid Alyafeai Date: Fri, 19 Jul 2024 15:08:19 +0000 Subject: [PATCH] add datasets viewer --- assets/js/index.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/assets/js/index.js b/assets/js/index.js index 33642ef..fe0bd34 100644 --- a/assets/js/index.js +++ b/assets/js/index.js @@ -78,6 +78,13 @@ async function getOGimage(url) { return "./assets/images/logo.png" } +function create_hf_viewer(hf_link){ + if (hf_link.toString() == 'nan') + return '' + else + return `` +} + async function fomratDetails(data, index) { // console.log(data, "s") await getOGimage(data['Link']).then(res => { @@ -170,6 +177,8 @@ async function fomratDetails(data, index) { 'Details' + 'Paper' + '' + + create_hf_viewer(data['HF Link'])+ + '' // }) }