paperswithcode / assets /ExternalSourceEvalBadge-BIZHg7OO.js
nielsr's picture
nielsr HF Staff
Sync paperswithcode.co frontend
14aee29 verified
Raw
History Blame Contribute Delete
1.72 kB
import{j as e,L as l}from"./index-Dq4RFSP6.js";import{H as t,a as n,b as o}from"./hover-card-BxOV7XYi.js";const u=()=>e.jsxs(t,{openDelay:120,closeDelay:120,children:[e.jsx(n,{asChild:!0,children:e.jsx("button",{type:"button",className:"bm-closed-source-tag","aria-label":"Closed-source model",children:"closed"})}),e.jsxs(o,{side:"top",align:"start",className:"w-auto max-w-[260px] p-3 text-sm leading-snug",children:["This is an evaluation of a closed-source model. You can disable viewing these in your"," ",e.jsx(l,{to:"/settings",className:"closed-eval-tooltip-link",children:"settings"}),"."]})]});function i(a){if(!a)return"Evaluation sourced outside this paper";const r=a.toLowerCase();if(r.includes("open-asr-leaderboard"))return"Open ASR Leaderboard";if(r.includes("arcprize.org"))return"ARC Prize Leaderboard";if(r.includes("frontierswe.com"))return"FrontierSWE";if(r.includes("deepswe.datacurve.ai"))return"DeepSWE";try{const s=new URL(a,"https://paperswithcode.co");return s.pathname.startsWith("/paper/")?"Source paper":s.hostname.replace(/^www\./,"")}catch{return a}}const p=({sourceUrl:a})=>{const r=i(a);return e.jsxs(t,{openDelay:120,closeDelay:120,children:[e.jsx(n,{asChild:!0,children:e.jsx("button",{type:"button",className:"bm-external-source-tag","aria-label":`Externally sourced evaluation: ${r}`,children:"External"})}),e.jsxs(o,{side:"top",align:"start",className:"w-auto max-w-[280px] p-3 text-sm leading-snug",children:["This score was sourced outside this paper.",a?e.jsxs(e.Fragment,{children:[" ",e.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"external-eval-tooltip-link",children:r}),"."]}):e.jsxs(e.Fragment,{children:[" ",r,"."]})]})]})};export{u as C,p as E};