fdaudens's picture
fdaudens HF Staff
Upload 13 files
1aa9a18 verified
raw
history blame
192 kB
<!doctype html>
<html class="light">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
<meta name="description" content="We’re on a journey to advance and democratize artificial intelligence through open source and open science." />
<meta property="fb:app_id" content="1321688464574422" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@huggingface" />
<meta name="twitter:image" content="https://huggingface.co/front/thumbnails/v2-2.png" />
<meta property="og:title" content="app.py · fdaudens/test-app at main" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://huggingface.co/spaces/fdaudens/test-app/blob/main/app.py" />
<meta property="og:image" content="https://huggingface.co/front/thumbnails/v2-2.png" />
<link rel="stylesheet" href="/front/build/kube-1458491/style.css" />
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link
href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700;1,900&display=swap"
rel="stylesheet"
/>
<link
href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600;700&display=swap"
rel="stylesheet"
/>
<link
rel="preload"
href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.12.0/katex.min.css"
as="style"
onload="this.onload=null;this.rel='stylesheet'"
/>
<noscript>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.12.0/katex.min.css" />
</noscript>
<link rel="canonical" href="https://huggingface.co/spaces/fdaudens/test-app/blob/main/app.py"> <!-- HEAD_svelte-1oal594_START --><style>.blob-line-num::before {
content: attr(data-line-num);
}
</style><!-- HEAD_svelte-1oal594_END -->
<title>app.py · fdaudens/test-app at main</title>
<script
defer
data-domain="huggingface.co"
event-loggedIn="true"
src="/js/script.pageview-props.js"
></script>
<script>
window.plausible =
window.plausible ||
function () {
(window.plausible.q = window.plausible.q || []).push(arguments);
};
</script>
<script>
window.hubConfig = {"features":{"signupDisabled":false},"sshGitUrl":"[email protected]","moonHttpUrl":"https:\/\/huggingface.co","captchaApiKey":"bd5f2066-93dc-4bdd-a64b-a24646ca3859","captchaDisabledOnSignup":true,"datasetViewerPublicUrl":"https:\/\/datasets-server.huggingface.co","stripePublicKey":"pk_live_x2tdjFXBCvXo2FFmMybezpeM00J6gPCAAc","environment":"production","userAgent":"HuggingFace (production)","spacesIframeDomain":"hf.space","spacesApiUrl":"https:\/\/api.hf.space","docSearchKey":"ece5e02e57300e17d152c08056145326e90c4bff3dd07d7d1ae40cf1c8d39cb6","logoDev":{"apiUrl":"https:\/\/img.logo.dev\/","apiKey":"pk_UHS2HZOeRnaSOdDp7jbd5w"}};
</script>
<script type="text/javascript" src="https://de5282c3ca0c.edge.sdk.awswaf.com/de5282c3ca0c/526cf06acb0d/challenge.js" defer></script>
</head>
<body class="flex flex-col min-h-dvh bg-white dark:bg-gray-950 text-black ViewerBlobPage">
<div class="flex min-h-dvh flex-col"><div class="SVELTE_HYDRATER contents" data-target="SystemThemeMonitor" data-props="{&quot;isLoggedIn&quot;:true,&quot;theme&quot;:&quot;light&quot;}"></div>
<div class="SVELTE_HYDRATER contents" data-target="MainHeader" data-props="{&quot;authLight&quot;:{&quot;csrfToken&quot;:&quot;eyJkYXRhIjp7ImV4cGlyYXRpb24iOjE3NDMwMjIwNDY3ODQsInVzZXJJZCI6IjY0N2YzNmE4NDU0YWYwMjM3YmQ0OTU3NCJ9LCJzaWduYXR1cmUiOiIwNzU4OThhM2Q1ZGM2NGEwNzBlY2MyNjVkMTdmODdkYzdiN2Y1YjZhMTVjOWRkM2EyNTg4MzY0NDFjNDdlMWUzIn0=&quot;,&quot;hasHfLevelAccess&quot;:true,&quot;u&quot;:{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/647f36a8454af0237bd49574/jshkqBUTY-GZL8As8y6Aq.jpeg&quot;,&quot;isPro&quot;:false,&quot;orgs&quot;:[{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/1583856921041-5dd96eb166059660ed1ee413.png&quot;,&quot;email&quot;:&quot;[email protected]&quot;,&quot;fullname&quot;:&quot;Hugging Face&quot;,&quot;name&quot;:&quot;huggingface&quot;,&quot;requiresSSO&quot;:false,&quot;isEnterprise&quot;:true,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:true,&quot;numUsers&quot;:211},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/1664215365576-5e3aec01f55e2b62848a5217.png&quot;,&quot;email&quot;:&quot;[email protected]&quot;,&quot;fullname&quot;:&quot;Hugging Face OSS Metrics&quot;,&quot;name&quot;:&quot;open-source-metrics&quot;,&quot;requiresSSO&quot;:false,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;numUsers&quot;:49},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/651e96991b97c9f33d26bde6/e4VK7uW5sTeCYupD0s_ob.png&quot;,&quot;email&quot;:&quot;[email protected]&quot;,&quot;fullname&quot;:&quot;Hugging Face Smol Models Research&quot;,&quot;name&quot;:&quot;HuggingFaceTB&quot;,&quot;requiresSSO&quot;:false,&quot;isEnterprise&quot;:true,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;numUsers&quot;:40},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/5f17f0a0925b9863e28ad517/exBCcWH8McHg1hVQAtvN5.png&quot;,&quot;fullname&quot;:&quot;ZeroGPU Explorers&quot;,&quot;name&quot;:&quot;zero-gpu-explorers&quot;,&quot;requiresSSO&quot;:false,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;numUsers&quot;:753},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/631ce4b244503b72277fc89f/pcLUTLsvMQiR-ujlTgLYF.png&quot;,&quot;fullname&quot;:&quot;LeRobot&quot;,&quot;name&quot;:&quot;lerobot&quot;,&quot;requiresSSO&quot;:false,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;numUsers&quot;:13},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/63691c3eda9b693c2730b2a2/WoOIHdJahrAnLo1wpyVjc.png&quot;,&quot;email&quot;:&quot;[email protected]&quot;,&quot;fullname&quot;:&quot;Journalists on Hugging Face&quot;,&quot;name&quot;:&quot;JournalistsonHF&quot;,&quot;requiresSSO&quot;:false,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;numUsers&quot;:366},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/6304c06eeb6d777a838eab63/qkILUu9lckQxgxfxOn2xm.png&quot;,&quot;fullname&quot;:&quot;Major TOM&quot;,&quot;name&quot;:&quot;Major-TOM&quot;,&quot;requiresSSO&quot;:false,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;numUsers&quot;:79},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/623c830997ddced06d78699b/3qTjC7d3YFCJTwpxd2noq.png&quot;,&quot;fullname&quot;:&quot;MLX Community&quot;,&quot;name&quot;:&quot;mlx-community&quot;,&quot;requiresSSO&quot;:false,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;numUsers&quot;:2472},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/5f17f0a0925b9863e28ad517/nxmdd6m86cxu55UZBlQeg.jpeg&quot;,&quot;email&quot;:&quot;[email protected]&quot;,&quot;fullname&quot;:&quot;Social Post Explorers&quot;,&quot;name&quot;:&quot;social-post-explorers&quot;,&quot;requiresSSO&quot;:false,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;numUsers&quot;:863},{&quot;avatarUrl&quot;:&quot;https://www.gravatar.com/avatar/05f76a7a3db7a31f95ba71d0e79d83d9?d=retro&amp;size=100&quot;,&quot;email&quot;:&quot;[email protected]&quot;,&quot;fullname&quot;:&quot;Projet Spinoza&quot;,&quot;name&quot;:&quot;SpinozaProject&quot;,&quot;requiresSSO&quot;:false,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;numUsers&quot;:192},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/5f17f0a0925b9863e28ad517/V8fnWFEWwXTgCQuIHnPmk.png&quot;,&quot;fullname&quot;:&quot;Dev Mode Explorers&quot;,&quot;name&quot;:&quot;dev-mode-explorers&quot;,&quot;requiresSSO&quot;:false,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;numUsers&quot;:146},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/6459fa0f5b3111fbe83286e1/TCv1NK707PxgaE5XsXWOx.png&quot;,&quot;email&quot;:&quot;[email protected]&quot;,&quot;fullname&quot;:&quot;Hugging Face for Legal&quot;,&quot;name&quot;:&quot;HFforLegal&quot;,&quot;requiresSSO&quot;:false,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;numUsers&quot;:83},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/6340651b388c3fa40f9a5bc0/j6Vb_hutYuKRcQgMaDTAt.png&quot;,&quot;fullname&quot;:&quot;Hugging Face Discord Community&quot;,&quot;name&quot;:&quot;discord-community&quot;,&quot;requiresSSO&quot;:false,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;numUsers&quot;:16311},{&quot;avatarUrl&quot;:&quot;https://www.gravatar.com/avatar/9cc01952b94dc65c12157d08eaa3c092?d=retro&amp;size=100&quot;,&quot;email&quot;:&quot;[email protected]&quot;,&quot;fullname&quot;:&quot;Big Science Social Impact Evaluation for Bias and Stereotypes&quot;,&quot;name&quot;:&quot;LanguageShades&quot;,&quot;requiresSSO&quot;:false,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;numUsers&quot;:24},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/60107b385ac3e86b3ea4fc34/jFu_9O8gk_aN9WFowX5jJ.jpeg&quot;,&quot;fullname&quot;:&quot;Dataset Tools&quot;,&quot;name&quot;:&quot;Dataset-Tools&quot;,&quot;requiresSSO&quot;:false,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;numUsers&quot;:33},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/5e48005437cb5b49818287a5/oges-i7Dd9Fs0FDrh3bEs.png&quot;,&quot;fullname&quot;:&quot;Hugging Face Science&quot;,&quot;name&quot;:&quot;science&quot;,&quot;requiresSSO&quot;:false,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;numUsers&quot;:21},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/6202a599216215a22221dea9/rr6CrfvI8WRIMumnscdWq.png&quot;,&quot;fullname&quot;:&quot;Coordination Nationale pour l'IA&quot;,&quot;name&quot;:&quot;fr-gouv-coordination-ia&quot;,&quot;requiresSSO&quot;:false,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;numUsers&quot;:21},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/60107b385ac3e86b3ea4fc34/a9OUIjngSfobGiQhc_B6Z.png&quot;,&quot;fullname&quot;:&quot;Data Is Better Together Contributor&quot;,&quot;name&quot;:&quot;data-is-better-together-contributor&quot;,&quot;requiresSSO&quot;:false,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;numUsers&quot;:89},{&quot;avatarUrl&quot;:&quot;https://www.gravatar.com/avatar/2cc245ecb4e7dd7f0526018fce64190c?d=retro&amp;size=100&quot;,&quot;email&quot;:&quot;[email protected]&quot;,&quot;fullname&quot;:&quot;Sandbox&quot;,&quot;name&quot;:&quot;projects-sandbox&quot;,&quot;requiresSSO&quot;:false,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;numUsers&quot;:5},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/651e96991b97c9f33d26bde6/QG_uzb2VV3OeKO0c61ynh.png&quot;,&quot;email&quot;:&quot;[email protected]&quot;,&quot;fullname&quot;:&quot;Open R1&quot;,&quot;name&quot;:&quot;open-r1&quot;,&quot;requiresSSO&quot;:false,&quot;isEnterprise&quot;:true,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;numUsers&quot;:31}],&quot;user&quot;:&quot;fdaudens&quot;,&quot;canPost&quot;:true,&quot;canHaveBilling&quot;:true,&quot;canCreateOrg&quot;:true,&quot;theme&quot;:&quot;light&quot;,&quot;notifications&quot;:{&quot;org_suggestions&quot;:false,&quot;discussions_participating&quot;:true,&quot;posts_participating&quot;:true,&quot;discussions_watched&quot;:true,&quot;daily_papers_digest&quot;:true},&quot;hardwareItems&quot;:[{&quot;sku&quot;:[&quot;Apple Silicon&quot;,&quot;-&quot;,&quot;Apple M3&quot;],&quot;mem&quot;:16,&quot;num&quot;:1}],&quot;hardwareItemsPrivate&quot;:false,&quot;usage&quot;:{&quot;storage&quot;:{&quot;summary&quot;:{&quot;dataset&quot;:{&quot;used&quot;:3142565783,&quot;usedPrivate&quot;:0,&quot;usedPublic&quot;:3142565783,&quot;count&quot;:18},&quot;model&quot;:{&quot;used&quot;:16271348444,&quot;usedPrivate&quot;:1020185541,&quot;usedPublic&quot;:15251162903,&quot;count&quot;:7},&quot;space&quot;:{&quot;used&quot;:1093272957,&quot;usedPrivate&quot;:93041701,&quot;usedPublic&quot;:1000231256,&quot;count&quot;:34}},&quot;used&quot;:20507187184,&quot;count&quot;:59,&quot;limit&quot;:100000000000,&quot;popularityGrant&quot;:100000000000,&quot;usedPrivate&quot;:1113227242,&quot;usedPublic&quot;:19393959942,&quot;historicalGrant&quot;:1064603195},&quot;inferenceApi&quot;:{&quot;used&quot;:161,&quot;duration&quot;:86400,&quot;renewal&quot;:8293,&quot;lastUpdated&quot;:&quot;2025-02-03T21:41:47.843Z&quot;},&quot;zeroGpu&quot;:{&quot;base&quot;:1500,&quot;current&quot;:1500,&quot;lastUpdated&quot;:&quot;2025-03-25T20:47:14.299Z&quot;},&quot;inference&quot;:{&quot;usedNanoUsd&quot;:29833465702,&quot;numRequests&quot;:4148,&quot;providerDetails&quot;:[{&quot;provider&quot;:&quot;hf-inference&quot;,&quot;numRequests&quot;:4134,&quot;totalCostNanoUsd&quot;:29563465702,&quot;totalDurationMs&quot;:24554807},{&quot;provider&quot;:&quot;fireworks-ai&quot;,&quot;numRequests&quot;:6,&quot;totalCostNanoUsd&quot;:30000000,&quot;totalDurationMs&quot;:53617},{&quot;provider&quot;:&quot;replicate&quot;,&quot;numRequests&quot;:8,&quot;totalCostNanoUsd&quot;:240000000,&quot;totalDurationMs&quot;:311434}],&quot;periodEnd&quot;:&quot;2025-03-31T23:59:59.999Z&quot;,&quot;periodStart&quot;:&quot;2025-03-01T00:00:00.000Z&quot;,&quot;includedNanoUsd&quot;:2000000000,&quot;limitNanoUsd&quot;:null,&quot;lastUpdated&quot;:&quot;2025-03-25T20:47:14.299Z&quot;}},&quot;xetWaitlist&quot;:{&quot;status&quot;:&quot;pending&quot;,&quot;joinedAt&quot;:&quot;2025-03-25T13:36:13.689Z&quot;},&quot;welcomeLinks&quot;:[&quot;models&quot;]}},&quot;classNames&quot;:&quot;&quot;,&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/647f36a8454af0237bd49574/jshkqBUTY-GZL8As8y6Aq.jpeg&quot;,&quot;isWide&quot;:false,&quot;isZh&quot;:false,&quot;user&quot;:&quot;fdaudens&quot;,&quot;unreadNotifications&quot;:447,&quot;csrf&quot;:&quot;eyJkYXRhIjp7ImV4cGlyYXRpb24iOjE3NDMwMjIwNDY3ODQsInVzZXJJZCI6IjY0N2YzNmE4NDU0YWYwMjM3YmQ0OTU3NCJ9LCJzaWduYXR1cmUiOiIwNzU4OThhM2Q1ZGM2NGEwNzBlY2MyNjVkMTdmODdkYzdiN2Y1YjZhMTVjOWRkM2EyNTg4MzY0NDFjNDdlMWUzIn0=&quot;,&quot;canCreateOrg&quot;:true,&quot;isPro&quot;:false}"><header class="border-b border-gray-100 "><div class="w-full px-4 container flex h-16 items-center"><div class="flex flex-1 items-center"><a class="mr-5 flex flex-none items-center lg:mr-6" href="/"><img alt="Hugging Face's logo" class="w-7 md:mr-2" src="/front/assets/huggingface_logo-noborder.svg">
<span class="hidden whitespace-nowrap text-lg font-bold md:block">Hugging Face</span></a>
<div class="relative flex-1 lg:max-w-sm mr-2 sm:mr-4 md:mr-3 xl:mr-6"><input autocomplete="off" class="w-full dark:bg-gray-950 pl-8 form-input-alt h-9 pr-3 focus:shadow-xl " name="" placeholder="Search models, datasets, users..." spellcheck="false" type="text" value="">
<svg class="absolute left-2.5 text-gray-400 top-1/2 transform -translate-y-1/2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M30 28.59L22.45 21A11 11 0 1 0 21 22.45L28.59 30zM5 14a9 9 0 1 1 9 9a9 9 0 0 1-9-9z" fill="currentColor"></path></svg>
</div>
<div class="flex flex-none items-center justify-center p-0.5 place-self-stretch lg:hidden"><button class="relative z-40 flex h-6 w-8 items-center justify-center" type="button"><svg width="1em" height="1em" viewBox="0 0 10 10" class="text-xl" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" preserveAspectRatio="xMidYMid meet" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M1.65039 2.9999C1.65039 2.8066 1.80709 2.6499 2.00039 2.6499H8.00039C8.19369 2.6499 8.35039 2.8066 8.35039 2.9999C8.35039 3.1932 8.19369 3.3499 8.00039 3.3499H2.00039C1.80709 3.3499 1.65039 3.1932 1.65039 2.9999ZM1.65039 4.9999C1.65039 4.8066 1.80709 4.6499 2.00039 4.6499H8.00039C8.19369 4.6499 8.35039 4.8066 8.35039 4.9999C8.35039 5.1932 8.19369 5.3499 8.00039 5.3499H2.00039C1.80709 5.3499 1.65039 5.1932 1.65039 4.9999ZM2.00039 6.6499C1.80709 6.6499 1.65039 6.8066 1.65039 6.9999C1.65039 7.1932 1.80709 7.3499 2.00039 7.3499H8.00039C8.19369 7.3499 8.35039 7.1932 8.35039 6.9999C8.35039 6.8066 8.19369 6.6499 8.00039 6.6499H2.00039Z"></path></svg>
<div class="bg-linear-to-br absolute bottom-0.5 right-1.5 z-20 h-2 w-2 rounded-full from-yellow-400 to-orange-500 ring-1 ring-white dark:ring-gray-950"></div></button>
</div></div>
<nav aria-label="Main" class="ml-auto hidden lg:block"><ul class="flex items-center space-x-1.5 2xl:space-x-2"><li class="hover:text-indigo-700"><a class="group flex items-center px-2 py-0.5 dark:text-gray-300 dark:hover:text-gray-100" href="/models"><svg class="mr-1.5 text-gray-400 group-hover:text-indigo-500" style="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path class="uim-quaternary" d="M20.23 7.24L12 12L3.77 7.24a1.98 1.98 0 0 1 .7-.71L11 2.76c.62-.35 1.38-.35 2 0l6.53 3.77c.29.173.531.418.7.71z" opacity=".25" fill="currentColor"></path><path class="uim-tertiary" d="M12 12v9.5a2.09 2.09 0 0 1-.91-.21L4.5 17.48a2.003 2.003 0 0 1-1-1.73v-7.5a2.06 2.06 0 0 1 .27-1.01L12 12z" opacity=".5" fill="currentColor"></path><path class="uim-primary" d="M20.5 8.25v7.5a2.003 2.003 0 0 1-1 1.73l-6.62 3.82c-.275.13-.576.198-.88.2V12l8.23-4.76c.175.308.268.656.27 1.01z" fill="currentColor"></path></svg>
Models</a>
</li><li class="hover:text-red-700"><a class="group flex items-center px-2 py-0.5 dark:text-gray-300 dark:hover:text-gray-100" href="/datasets"><svg class="mr-1.5 text-gray-400 group-hover:text-red-500" style="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 25 25"><ellipse cx="12.5" cy="5" fill="currentColor" fill-opacity="0.25" rx="7.5" ry="2"></ellipse><path d="M12.5 15C16.6421 15 20 14.1046 20 13V20C20 21.1046 16.6421 22 12.5 22C8.35786 22 5 21.1046 5 20V13C5 14.1046 8.35786 15 12.5 15Z" fill="currentColor" opacity="0.5"></path><path d="M12.5 7C16.6421 7 20 6.10457 20 5V11.5C20 12.6046 16.6421 13.5 12.5 13.5C8.35786 13.5 5 12.6046 5 11.5V5C5 6.10457 8.35786 7 12.5 7Z" fill="currentColor" opacity="0.5"></path><path d="M5.23628 12C5.08204 12.1598 5 12.8273 5 13C5 14.1046 8.35786 15 12.5 15C16.6421 15 20 14.1046 20 13C20 12.8273 19.918 12.1598 19.7637 12C18.9311 12.8626 15.9947 13.5 12.5 13.5C9.0053 13.5 6.06886 12.8626 5.23628 12Z" fill="currentColor"></path></svg>
Datasets</a>
</li><li class="hover:text-blue-700"><a class="group flex items-center px-2 py-0.5 dark:text-gray-300 dark:hover:text-gray-100" href="/spaces"><svg class="mr-1.5 text-gray-400 group-hover:text-blue-500" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" viewBox="0 0 25 25"><path opacity=".5" d="M6.016 14.674v4.31h4.31v-4.31h-4.31ZM14.674 14.674v4.31h4.31v-4.31h-4.31ZM6.016 6.016v4.31h4.31v-4.31h-4.31Z" fill="currentColor"></path><path opacity=".75" fill-rule="evenodd" clip-rule="evenodd" d="M3 4.914C3 3.857 3.857 3 4.914 3h6.514c.884 0 1.628.6 1.848 1.414a5.171 5.171 0 0 1 7.31 7.31c.815.22 1.414.964 1.414 1.848v6.514A1.914 1.914 0 0 1 20.086 22H4.914A1.914 1.914 0 0 1 3 20.086V4.914Zm3.016 1.102v4.31h4.31v-4.31h-4.31Zm0 12.968v-4.31h4.31v4.31h-4.31Zm8.658 0v-4.31h4.31v4.31h-4.31Zm0-10.813a2.155 2.155 0 1 1 4.31 0 2.155 2.155 0 0 1-4.31 0Z" fill="currentColor"></path><path opacity=".25" d="M16.829 6.016a2.155 2.155 0 1 0 0 4.31 2.155 2.155 0 0 0 0-4.31Z" fill="currentColor"></path></svg>
Spaces</a>
</li><li class="hover:text-yellow-700 max-xl:hidden"><a class="group flex items-center px-2 py-0.5 dark:text-gray-300 dark:hover:text-gray-100" href="/posts"><svg class="mr-1.5 text-gray-400 group-hover:text-yellow-500 text-yellow-500!" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" viewBox="0 0 12 12" preserveAspectRatio="xMidYMid meet"><path fill="currentColor" fill-rule="evenodd" d="M3.73 2.4A4.25 4.25 0 1 1 6 10.26H2.17l-.13-.02a.43.43 0 0 1-.3-.43l.01-.06a.43.43 0 0 1 .12-.22l.84-.84A4.26 4.26 0 0 1 3.73 2.4Z" clip-rule="evenodd"></path></svg>
Posts</a>
</li><li class="hover:text-yellow-700"><a class="group flex items-center px-2 py-0.5 dark:text-gray-300 dark:hover:text-gray-100" href="/docs"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="mr-1.5 text-gray-400 group-hover:text-yellow-500" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 16 16"><path d="m2.28 3.7-.3.16a.67.67 0 0 0-.34.58v8.73l.01.04.02.07.01.04.03.06.02.04.02.03.04.06.05.05.04.04.06.04.06.04.08.04.08.02h.05l.07.02h.11l.04-.01.07-.02.03-.01.07-.03.22-.12a5.33 5.33 0 0 1 5.15.1.67.67 0 0 0 .66 0 5.33 5.33 0 0 1 5.33 0 .67.67 0 0 0 1-.58V4.36a.67.67 0 0 0-.34-.5l-.3-.17v7.78a.63.63 0 0 1-.87.59 4.9 4.9 0 0 0-4.35.35l-.65.39a.29.29 0 0 1-.15.04.29.29 0 0 1-.16-.04l-.65-.4a4.9 4.9 0 0 0-4.34-.34.63.63 0 0 1-.87-.59V3.7Z" fill="currentColor" class="dark:opacity-40"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8 3.1a5.99 5.99 0 0 0-5.3-.43.66.66 0 0 0-.42.62v8.18c0 .45.46.76.87.59a4.9 4.9 0 0 1 4.34.35l.65.39c.05.03.1.04.16.04.05 0 .1-.01.15-.04l.65-.4a4.9 4.9 0 0 1 4.35-.34.63.63 0 0 0 .86-.59V3.3a.67.67 0 0 0-.41-.62 5.99 5.99 0 0 0-5.3.43l-.3.17L8 3.1Zm.73 1.87a.43.43 0 1 0-.86 0v5.48a.43.43 0 0 0 .86 0V4.97Z" fill="currentColor" class="opacity-40 dark:opacity-100"></path><path d="M8.73 4.97a.43.43 0 1 0-.86 0v5.48a.43.43 0 1 0 .86 0V4.96Z" fill="currentColor" class="dark:opacity-40"></path></svg>
Docs</a>
</li><li class="hover:text-black dark:hover:text-white"><a class="group flex items-center px-2 py-0.5 dark:text-gray-300 dark:hover:text-gray-100" href="/enterprise"><svg class="mr-1.5 text-gray-400 group-hover:text-black dark:group-hover:text-white" xmlns="http://www.w3.org/2000/svg" fill="none" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 33 27"><path fill="currentColor" fill-rule="evenodd" d="M13.5.7a8.7 8.7 0 0 0-7.7 5.7L1 20.6c-1 3.1.9 5.7 4.1 5.7h15c3.3 0 6.8-2.6 7.8-5.7l4.6-14.2c1-3.1-.8-5.7-4-5.7h-15Zm1.1 5.7L9.8 20.3h9.8l1-3.1h-5.8l.8-2.5h4.8l1.1-3h-4.8l.8-2.3H23l1-3h-9.5Z" clip-rule="evenodd"></path></svg>
Enterprise</a>
</li>
<li><a class="group flex items-center px-2 py-0.5 dark:text-gray-300 dark:hover:text-gray-100" href="/pricing">Pricing
</a></li>
<li><div class="relative group">
<button class="px-2 py-0.5 hover:text-gray-500 dark:hover:text-gray-600 flex items-center " type="button">
<svg class=" text-gray-500 w-5 group-hover:text-gray-400 dark:text-gray-300 dark:group-hover:text-gray-100" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" viewBox="0 0 32 18" preserveAspectRatio="xMidYMid meet"><path fill-rule="evenodd" clip-rule="evenodd" d="M14.4504 3.30221C14.4504 2.836 14.8284 2.45807 15.2946 2.45807H28.4933C28.9595 2.45807 29.3374 2.836 29.3374 3.30221C29.3374 3.76842 28.9595 4.14635 28.4933 4.14635H15.2946C14.8284 4.14635 14.4504 3.76842 14.4504 3.30221Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M14.4504 9.00002C14.4504 8.53382 14.8284 8.15588 15.2946 8.15588H28.4933C28.9595 8.15588 29.3374 8.53382 29.3374 9.00002C29.3374 9.46623 28.9595 9.84417 28.4933 9.84417H15.2946C14.8284 9.84417 14.4504 9.46623 14.4504 9.00002Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M14.4504 14.6978C14.4504 14.2316 14.8284 13.8537 15.2946 13.8537H28.4933C28.9595 13.8537 29.3374 14.2316 29.3374 14.6978C29.3374 15.164 28.9595 15.542 28.4933 15.542H15.2946C14.8284 15.542 14.4504 15.164 14.4504 14.6978Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M1.94549 6.87377C2.27514 6.54411 2.80962 6.54411 3.13928 6.87377L6.23458 9.96907L9.32988 6.87377C9.65954 6.54411 10.194 6.54411 10.5237 6.87377C10.8533 7.20343 10.8533 7.73791 10.5237 8.06756L6.23458 12.3567L1.94549 8.06756C1.61583 7.73791 1.61583 7.20343 1.94549 6.87377Z" fill="currentColor"></path></svg>
</button>
</div></li>
<li><hr class="h-5 w-0.5 border-none bg-gray-100 dark:bg-gray-800"></li>
<li><form action="/logout" method="POST" class="hidden"><input type="hidden" name="csrf" value="eyJkYXRhIjp7ImV4cGlyYXRpb24iOjE3NDMwMjIwNDY3ODQsInVzZXJJZCI6IjY0N2YzNmE4NDU0YWYwMjM3YmQ0OTU3NCJ9LCJzaWduYXR1cmUiOiIwNzU4OThhM2Q1ZGM2NGEwNzBlY2MyNjVkMTdmODdkYzdiN2Y1YjZhMTVjOWRkM2EyNTg4MzY0NDFjNDdlMWUzIn0="></form>
<div class="relative ml-2 w-[1.38rem] h-[1.38rem] ">
<button class="ml-auto rounded-full ring-2 group ring-yellow-500 ring-offset-1 focus:ring-yellow-600 hover:ring-offset-1 focus:ring-offset-1 focus:outline-hidden outline-hidden dark:ring-offset-gray-950 " type="button">
<div class="relative"><img alt="" class="h-[1.38rem] w-[1.38rem] overflow-hidden rounded-full" src="https://cdn-avatars.huggingface.co/v1/production/uploads/647f36a8454af0237bd49574/jshkqBUTY-GZL8As8y6Aq.jpeg" crossorigin="anonymous">
<div class="bg-linear-to-br absolute -bottom-0.5 -right-0.5 z-20 h-2 w-2 rounded-full from-yellow-400 to-orange-500 ring-1 ring-white dark:ring-gray-950"></div></div>
</button>
</div></li></ul></nav></div></header></div>
<div class="SVELTE_HYDRATER contents" data-target="SSOBanner" data-props="{&quot;organizations&quot;:[]}"></div>
<main class="flex flex-1 flex-col"><div class="SVELTE_HYDRATER contents" data-target="SpaceHeader" data-props="{&quot;activeTab&quot;:&quot;files&quot;,&quot;authLight&quot;:{&quot;csrfToken&quot;:&quot;eyJkYXRhIjp7ImV4cGlyYXRpb24iOjE3NDMwMjIwNDY3ODQsInVzZXJJZCI6IjY0N2YzNmE4NDU0YWYwMjM3YmQ0OTU3NCJ9LCJzaWduYXR1cmUiOiIwNzU4OThhM2Q1ZGM2NGEwNzBlY2MyNjVkMTdmODdkYzdiN2Y1YjZhMTVjOWRkM2EyNTg4MzY0NDFjNDdlMWUzIn0=&quot;,&quot;hasHfLevelAccess&quot;:true,&quot;u&quot;:{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/647f36a8454af0237bd49574/jshkqBUTY-GZL8As8y6Aq.jpeg&quot;,&quot;isPro&quot;:false,&quot;orgs&quot;:[{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/1583856921041-5dd96eb166059660ed1ee413.png&quot;,&quot;email&quot;:&quot;[email protected]&quot;,&quot;fullname&quot;:&quot;Hugging Face&quot;,&quot;name&quot;:&quot;huggingface&quot;,&quot;requiresSSO&quot;:false,&quot;isEnterprise&quot;:true,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:true,&quot;numUsers&quot;:211},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/1664215365576-5e3aec01f55e2b62848a5217.png&quot;,&quot;email&quot;:&quot;[email protected]&quot;,&quot;fullname&quot;:&quot;Hugging Face OSS Metrics&quot;,&quot;name&quot;:&quot;open-source-metrics&quot;,&quot;requiresSSO&quot;:false,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;numUsers&quot;:49},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/651e96991b97c9f33d26bde6/e4VK7uW5sTeCYupD0s_ob.png&quot;,&quot;email&quot;:&quot;[email protected]&quot;,&quot;fullname&quot;:&quot;Hugging Face Smol Models Research&quot;,&quot;name&quot;:&quot;HuggingFaceTB&quot;,&quot;requiresSSO&quot;:false,&quot;isEnterprise&quot;:true,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;numUsers&quot;:40},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/5f17f0a0925b9863e28ad517/exBCcWH8McHg1hVQAtvN5.png&quot;,&quot;fullname&quot;:&quot;ZeroGPU Explorers&quot;,&quot;name&quot;:&quot;zero-gpu-explorers&quot;,&quot;requiresSSO&quot;:false,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;numUsers&quot;:753},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/631ce4b244503b72277fc89f/pcLUTLsvMQiR-ujlTgLYF.png&quot;,&quot;fullname&quot;:&quot;LeRobot&quot;,&quot;name&quot;:&quot;lerobot&quot;,&quot;requiresSSO&quot;:false,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;numUsers&quot;:13},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/63691c3eda9b693c2730b2a2/WoOIHdJahrAnLo1wpyVjc.png&quot;,&quot;email&quot;:&quot;[email protected]&quot;,&quot;fullname&quot;:&quot;Journalists on Hugging Face&quot;,&quot;name&quot;:&quot;JournalistsonHF&quot;,&quot;requiresSSO&quot;:false,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;numUsers&quot;:366},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/6304c06eeb6d777a838eab63/qkILUu9lckQxgxfxOn2xm.png&quot;,&quot;fullname&quot;:&quot;Major TOM&quot;,&quot;name&quot;:&quot;Major-TOM&quot;,&quot;requiresSSO&quot;:false,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;numUsers&quot;:79},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/623c830997ddced06d78699b/3qTjC7d3YFCJTwpxd2noq.png&quot;,&quot;fullname&quot;:&quot;MLX Community&quot;,&quot;name&quot;:&quot;mlx-community&quot;,&quot;requiresSSO&quot;:false,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;numUsers&quot;:2472},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/5f17f0a0925b9863e28ad517/nxmdd6m86cxu55UZBlQeg.jpeg&quot;,&quot;email&quot;:&quot;[email protected]&quot;,&quot;fullname&quot;:&quot;Social Post Explorers&quot;,&quot;name&quot;:&quot;social-post-explorers&quot;,&quot;requiresSSO&quot;:false,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;numUsers&quot;:863},{&quot;avatarUrl&quot;:&quot;https://www.gravatar.com/avatar/05f76a7a3db7a31f95ba71d0e79d83d9?d=retro&amp;size=100&quot;,&quot;email&quot;:&quot;[email protected]&quot;,&quot;fullname&quot;:&quot;Projet Spinoza&quot;,&quot;name&quot;:&quot;SpinozaProject&quot;,&quot;requiresSSO&quot;:false,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;numUsers&quot;:192},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/5f17f0a0925b9863e28ad517/V8fnWFEWwXTgCQuIHnPmk.png&quot;,&quot;fullname&quot;:&quot;Dev Mode Explorers&quot;,&quot;name&quot;:&quot;dev-mode-explorers&quot;,&quot;requiresSSO&quot;:false,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;numUsers&quot;:146},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/6459fa0f5b3111fbe83286e1/TCv1NK707PxgaE5XsXWOx.png&quot;,&quot;email&quot;:&quot;[email protected]&quot;,&quot;fullname&quot;:&quot;Hugging Face for Legal&quot;,&quot;name&quot;:&quot;HFforLegal&quot;,&quot;requiresSSO&quot;:false,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;numUsers&quot;:83},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/6340651b388c3fa40f9a5bc0/j6Vb_hutYuKRcQgMaDTAt.png&quot;,&quot;fullname&quot;:&quot;Hugging Face Discord Community&quot;,&quot;name&quot;:&quot;discord-community&quot;,&quot;requiresSSO&quot;:false,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;numUsers&quot;:16311},{&quot;avatarUrl&quot;:&quot;https://www.gravatar.com/avatar/9cc01952b94dc65c12157d08eaa3c092?d=retro&amp;size=100&quot;,&quot;email&quot;:&quot;[email protected]&quot;,&quot;fullname&quot;:&quot;Big Science Social Impact Evaluation for Bias and Stereotypes&quot;,&quot;name&quot;:&quot;LanguageShades&quot;,&quot;requiresSSO&quot;:false,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;numUsers&quot;:24},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/60107b385ac3e86b3ea4fc34/jFu_9O8gk_aN9WFowX5jJ.jpeg&quot;,&quot;fullname&quot;:&quot;Dataset Tools&quot;,&quot;name&quot;:&quot;Dataset-Tools&quot;,&quot;requiresSSO&quot;:false,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;numUsers&quot;:33},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/5e48005437cb5b49818287a5/oges-i7Dd9Fs0FDrh3bEs.png&quot;,&quot;fullname&quot;:&quot;Hugging Face Science&quot;,&quot;name&quot;:&quot;science&quot;,&quot;requiresSSO&quot;:false,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;numUsers&quot;:21},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/6202a599216215a22221dea9/rr6CrfvI8WRIMumnscdWq.png&quot;,&quot;fullname&quot;:&quot;Coordination Nationale pour l'IA&quot;,&quot;name&quot;:&quot;fr-gouv-coordination-ia&quot;,&quot;requiresSSO&quot;:false,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;numUsers&quot;:21},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/60107b385ac3e86b3ea4fc34/a9OUIjngSfobGiQhc_B6Z.png&quot;,&quot;fullname&quot;:&quot;Data Is Better Together Contributor&quot;,&quot;name&quot;:&quot;data-is-better-together-contributor&quot;,&quot;requiresSSO&quot;:false,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;numUsers&quot;:89},{&quot;avatarUrl&quot;:&quot;https://www.gravatar.com/avatar/2cc245ecb4e7dd7f0526018fce64190c?d=retro&amp;size=100&quot;,&quot;email&quot;:&quot;[email protected]&quot;,&quot;fullname&quot;:&quot;Sandbox&quot;,&quot;name&quot;:&quot;projects-sandbox&quot;,&quot;requiresSSO&quot;:false,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;numUsers&quot;:5},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/651e96991b97c9f33d26bde6/QG_uzb2VV3OeKO0c61ynh.png&quot;,&quot;email&quot;:&quot;[email protected]&quot;,&quot;fullname&quot;:&quot;Open R1&quot;,&quot;name&quot;:&quot;open-r1&quot;,&quot;requiresSSO&quot;:false,&quot;isEnterprise&quot;:true,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;numUsers&quot;:31}],&quot;user&quot;:&quot;fdaudens&quot;,&quot;canPost&quot;:true,&quot;canHaveBilling&quot;:true,&quot;canCreateOrg&quot;:true,&quot;theme&quot;:&quot;light&quot;,&quot;notifications&quot;:{&quot;org_suggestions&quot;:false,&quot;discussions_participating&quot;:true,&quot;posts_participating&quot;:true,&quot;discussions_watched&quot;:true,&quot;daily_papers_digest&quot;:true},&quot;hardwareItems&quot;:[{&quot;sku&quot;:[&quot;Apple Silicon&quot;,&quot;-&quot;,&quot;Apple M3&quot;],&quot;mem&quot;:16,&quot;num&quot;:1}],&quot;hardwareItemsPrivate&quot;:false,&quot;usage&quot;:{&quot;storage&quot;:{&quot;summary&quot;:{&quot;dataset&quot;:{&quot;used&quot;:3142565783,&quot;usedPrivate&quot;:0,&quot;usedPublic&quot;:3142565783,&quot;count&quot;:18},&quot;model&quot;:{&quot;used&quot;:16271348444,&quot;usedPrivate&quot;:1020185541,&quot;usedPublic&quot;:15251162903,&quot;count&quot;:7},&quot;space&quot;:{&quot;used&quot;:1093272957,&quot;usedPrivate&quot;:93041701,&quot;usedPublic&quot;:1000231256,&quot;count&quot;:34}},&quot;used&quot;:20507187184,&quot;count&quot;:59,&quot;limit&quot;:100000000000,&quot;popularityGrant&quot;:100000000000,&quot;usedPrivate&quot;:1113227242,&quot;usedPublic&quot;:19393959942,&quot;historicalGrant&quot;:1064603195},&quot;inferenceApi&quot;:{&quot;used&quot;:161,&quot;duration&quot;:86400,&quot;renewal&quot;:8293,&quot;lastUpdated&quot;:&quot;2025-02-03T21:41:47.843Z&quot;},&quot;zeroGpu&quot;:{&quot;base&quot;:1500,&quot;current&quot;:1500,&quot;lastUpdated&quot;:&quot;2025-03-25T20:47:14.299Z&quot;},&quot;inference&quot;:{&quot;usedNanoUsd&quot;:29833465702,&quot;numRequests&quot;:4148,&quot;providerDetails&quot;:[{&quot;provider&quot;:&quot;hf-inference&quot;,&quot;numRequests&quot;:4134,&quot;totalCostNanoUsd&quot;:29563465702,&quot;totalDurationMs&quot;:24554807},{&quot;provider&quot;:&quot;fireworks-ai&quot;,&quot;numRequests&quot;:6,&quot;totalCostNanoUsd&quot;:30000000,&quot;totalDurationMs&quot;:53617},{&quot;provider&quot;:&quot;replicate&quot;,&quot;numRequests&quot;:8,&quot;totalCostNanoUsd&quot;:240000000,&quot;totalDurationMs&quot;:311434}],&quot;periodEnd&quot;:&quot;2025-03-31T23:59:59.999Z&quot;,&quot;periodStart&quot;:&quot;2025-03-01T00:00:00.000Z&quot;,&quot;includedNanoUsd&quot;:2000000000,&quot;limitNanoUsd&quot;:null,&quot;lastUpdated&quot;:&quot;2025-03-25T20:47:14.299Z&quot;}},&quot;xetWaitlist&quot;:{&quot;status&quot;:&quot;pending&quot;,&quot;joinedAt&quot;:&quot;2025-03-25T13:36:13.689Z&quot;},&quot;welcomeLinks&quot;:[&quot;models&quot;]}},&quot;author&quot;:{&quot;_id&quot;:&quot;647f36a8454af0237bd49574&quot;,&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/647f36a8454af0237bd49574/jshkqBUTY-GZL8As8y6Aq.jpeg&quot;,&quot;fullname&quot;:&quot;Florent Daudens&quot;,&quot;name&quot;:&quot;fdaudens&quot;,&quot;type&quot;:&quot;user&quot;,&quot;isPro&quot;:false,&quot;isHf&quot;:true,&quot;isHfAdmin&quot;:false,&quot;isMod&quot;:false,&quot;followerCount&quot;:590},&quot;canDisable&quot;:false,&quot;canReadRepoSettings&quot;:true,&quot;canWriteRepoSettings&quot;:true,&quot;discussionsStats&quot;:{&quot;closed&quot;:0,&quot;open&quot;:0,&quot;total&quot;:0},&quot;query&quot;:{},&quot;space&quot;:{&quot;author&quot;:&quot;fdaudens&quot;,&quot;colorFrom&quot;:&quot;green&quot;,&quot;colorTo&quot;:&quot;purple&quot;,&quot;cardData&quot;:{&quot;title&quot;:&quot;Test App&quot;,&quot;emoji&quot;:&quot;😻&quot;,&quot;colorFrom&quot;:&quot;green&quot;,&quot;colorTo&quot;:&quot;purple&quot;,&quot;sdk&quot;:&quot;gradio&quot;,&quot;sdk_version&quot;:&quot;5.23.0&quot;,&quot;app_file&quot;:&quot;app.py&quot;,&quot;pinned&quot;:false},&quot;createdAt&quot;:&quot;2025-03-25T18:39:28.000Z&quot;,&quot;emoji&quot;:&quot;😻&quot;,&quot;discussionsDisabled&quot;:false,&quot;duplicationDisabled&quot;:false,&quot;id&quot;:&quot;fdaudens/test-app&quot;,&quot;isLikedByUser&quot;:false,&quot;watched&quot;:{&quot;isWatching&quot;:true,&quot;isMuted&quot;:false,&quot;mode&quot;:&quot;global&quot;},&quot;lastModified&quot;:&quot;2025-03-25T20:41:36.000Z&quot;,&quot;likes&quot;:0,&quot;pinned&quot;:false,&quot;private&quot;:true,&quot;gated&quot;:false,&quot;repoType&quot;:&quot;space&quot;,&quot;subdomain&quot;:&quot;fdaudens-test-app&quot;,&quot;sdk&quot;:&quot;gradio&quot;,&quot;sdkVersion&quot;:&quot;5.23.0&quot;,&quot;title&quot;:&quot;Test App&quot;,&quot;runtime&quot;:{&quot;stage&quot;:&quot;RUNNING&quot;,&quot;hardware&quot;:{&quot;current&quot;:&quot;cpu-basic&quot;,&quot;requested&quot;:&quot;cpu-basic&quot;},&quot;storage&quot;:null,&quot;gcTimeout&quot;:172800,&quot;replicas&quot;:{&quot;current&quot;:1,&quot;requested&quot;:1},&quot;devMode&quot;:false,&quot;domains&quot;:[{&quot;domain&quot;:&quot;fdaudens-test-app.hf.space&quot;,&quot;stage&quot;:&quot;READY&quot;}],&quot;sha&quot;:&quot;863ba7428fb6bea75c3307d20c7137e1ba531a15&quot;},&quot;iframe&quot;:{&quot;embedSrc&quot;:&quot;https://fdaudens-test-app.hf.space&quot;,&quot;src&quot;:&quot;https://fdaudens-test-app.hf.space&quot;},&quot;secrets&quot;:[{&quot;key&quot;:&quot;HF_TOKEN&quot;,&quot;updatedAt&quot;:&quot;2025-03-25T20:27:41.021Z&quot;}],&quot;variables&quot;:[],&quot;sse&quot;:{&quot;url&quot;:&quot;https://api.hf.space/v1/fdaudens/test-app&quot;,&quot;jwt&quot;:&quot;eyJhbGciOiJFZERTQSJ9.eyJyZWFkIjp0cnVlLCJwZXJtaXNzaW9ucyI6eyJyZXBvLmNvbnRlbnQucmVhZCI6dHJ1ZX0sIm9uQmVoYWxmT2YiOnsia2luZCI6InVzZXIiLCJfaWQiOiI2NDdmMzZhODQ1NGFmMDIzN2JkNDk1NzQiLCJ1c2VyIjoiZmRhdWRlbnMifSwiaWF0IjoxNzQyOTM1NjQ2LCJzdWIiOiIvc3BhY2VzL2ZkYXVkZW5zL3Rlc3QtYXBwIiwiZXhwIjoxNzQzMDIyMDQ2LCJpc3MiOiJodHRwczovL2h1Z2dpbmdmYWNlLmNvIn0.rKVLiOJ9neejokxvDhquhuwXVdOMe5yazOFUjYafLLed-oL96Wj6hc3LUFduDpncHqchX8Zmekn9H_tMV17nDQ&quot;},&quot;dockerJwt&quot;:&quot;eyJhbGciOiJFZERTQSJ9.eyJyZWFkIjp0cnVlLCJwZXJtaXNzaW9ucyI6eyJyZXBvLmNvbnRlbnQucmVhZCI6dHJ1ZX0sIm9uQmVoYWxmT2YiOnsia2luZCI6InVzZXIiLCJfaWQiOiI2NDdmMzZhODQ1NGFmMDIzN2JkNDk1NzQiLCJ1c2VyIjoiZmRhdWRlbnMifSwiaWF0IjoxNzQyOTM1NjQ2LCJzdWIiOiIvc3BhY2VzL2ZkYXVkZW5zL3Rlc3QtYXBwIiwiZXhwIjoxNzQzMDIyMDQ2LCJpc3MiOiJodHRwczovL2h1Z2dpbmdmYWNlLmNvIn0.rKVLiOJ9neejokxvDhquhuwXVdOMe5yazOFUjYafLLed-oL96Wj6hc3LUFduDpncHqchX8Zmekn9H_tMV17nDQ&quot;,&quot;linkedModels&quot;:[{&quot;author&quot;:&quot;meta-llama&quot;,&quot;authorData&quot;:{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/646cf8084eefb026fb8fd8bc/oCTqufkdTkjyGodsx1vo1.png&quot;,&quot;fullname&quot;:&quot;Meta Llama&quot;,&quot;name&quot;:&quot;meta-llama&quot;,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;isHfAdmin&quot;:false,&quot;isMod&quot;:false,&quot;isEnterprise&quot;:true,&quot;followerCount&quot;:33616},&quot;downloads&quot;:1069891,&quot;gated&quot;:&quot;manual&quot;,&quot;id&quot;:&quot;meta-llama/Llama-3.3-70B-Instruct&quot;,&quot;availableInferenceProviders&quot;:[{&quot;name&quot;:&quot;fireworks-ai&quot;,&quot;modelStatus&quot;:&quot;live&quot;,&quot;providerStatus&quot;:&quot;live&quot;,&quot;providerId&quot;:&quot;accounts/fireworks/models/llama-v3p3-70b-instruct&quot;},{&quot;name&quot;:&quot;sambanova&quot;,&quot;modelStatus&quot;:&quot;live&quot;,&quot;providerStatus&quot;:&quot;live&quot;,&quot;providerId&quot;:&quot;Meta-Llama-3.3-70B-Instruct&quot;},{&quot;name&quot;:&quot;together&quot;,&quot;modelStatus&quot;:&quot;live&quot;,&quot;providerStatus&quot;:&quot;live&quot;,&quot;providerId&quot;:&quot;meta-llama/Llama-3.3-70B-Instruct-Turbo&quot;},{&quot;name&quot;:&quot;hf-inference&quot;,&quot;modelStatus&quot;:&quot;live&quot;,&quot;providerStatus&quot;:&quot;live&quot;,&quot;providerId&quot;:&quot;meta-llama/Llama-3.3-70B-Instruct&quot;},{&quot;name&quot;:&quot;nebius&quot;,&quot;modelStatus&quot;:&quot;live&quot;,&quot;providerStatus&quot;:&quot;live&quot;,&quot;providerId&quot;:&quot;meta-llama/Llama-3.3-70B-Instruct-fast&quot;},{&quot;name&quot;:&quot;novita&quot;,&quot;modelStatus&quot;:&quot;live&quot;,&quot;providerStatus&quot;:&quot;live&quot;,&quot;providerId&quot;:&quot;meta-llama/llama-3.3-70b-instruct&quot;},{&quot;name&quot;:&quot;hyperbolic&quot;,&quot;modelStatus&quot;:&quot;live&quot;,&quot;providerStatus&quot;:&quot;live&quot;,&quot;providerId&quot;:&quot;meta-llama/Llama-3.3-70B-Instruct&quot;},{&quot;name&quot;:&quot;cerebras&quot;,&quot;modelStatus&quot;:&quot;live&quot;,&quot;providerStatus&quot;:&quot;live&quot;,&quot;providerId&quot;:&quot;llama-3.3-70b&quot;}],&quot;lastModified&quot;:&quot;2024-12-21T18:28:01.000Z&quot;,&quot;likes&quot;:2194,&quot;pipeline_tag&quot;:&quot;text-generation&quot;,&quot;private&quot;:false,&quot;repoType&quot;:&quot;model&quot;,&quot;isLikedByUser&quot;:true,&quot;widgetOutputUrls&quot;:[]}],&quot;linkedDatasets&quot;:[],&quot;linkedCollections&quot;:[],&quot;sha&quot;:&quot;863ba7428fb6bea75c3307d20c7137e1ba531a15&quot;,&quot;hasBlockedOids&quot;:false,&quot;region&quot;:&quot;us&quot;,&quot;xetEnabled&quot;:false},&quot;u&quot;:{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/647f36a8454af0237bd49574/jshkqBUTY-GZL8As8y6Aq.jpeg&quot;,&quot;isPro&quot;:false,&quot;fullname&quot;:&quot;Florent Daudens&quot;,&quot;user&quot;:&quot;fdaudens&quot;,&quot;orgs&quot;:[{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/1583856921041-5dd96eb166059660ed1ee413.png&quot;,&quot;fullname&quot;:&quot;Hugging Face&quot;,&quot;name&quot;:&quot;huggingface&quot;,&quot;userRole&quot;:&quot;contributor&quot;,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:true,&quot;details&quot;:&quot;The AI community building the future.&quot;,&quot;isEnterprise&quot;:true,&quot;numUsers&quot;:211,&quot;canPay&quot;:true},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/1664215365576-5e3aec01f55e2b62848a5217.png&quot;,&quot;fullname&quot;:&quot;Hugging Face OSS Metrics&quot;,&quot;name&quot;:&quot;open-source-metrics&quot;,&quot;userRole&quot;:&quot;write&quot;,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;isEnterprise&quot;:false,&quot;numUsers&quot;:49,&quot;canPay&quot;:true},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/651e96991b97c9f33d26bde6/e4VK7uW5sTeCYupD0s_ob.png&quot;,&quot;fullname&quot;:&quot;Hugging Face Smol Models Research&quot;,&quot;name&quot;:&quot;HuggingFaceTB&quot;,&quot;userRole&quot;:&quot;write&quot;,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;details&quot;:&quot;Exploring smol models (for text, vision and video) and high quality web and synthetic datasets&quot;,&quot;isEnterprise&quot;:true,&quot;numUsers&quot;:40,&quot;xetWaitlist&quot;:{&quot;joinedAt&quot;:&quot;2025-03-18T14:52:11.157Z&quot;,&quot;joinedBy&quot;:{&quot;userId&quot;:&quot;61c141342aac764ce1654e43&quot;,&quot;user&quot;:&quot;loubnabnl&quot;,&quot;requestId&quot;:&quot;Root=1-67d9889a-340762c4018866bb3eb9b7bc&quot;},&quot;status&quot;:&quot;pending&quot;},&quot;canPay&quot;:true},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/5f17f0a0925b9863e28ad517/exBCcWH8McHg1hVQAtvN5.png&quot;,&quot;fullname&quot;:&quot;ZeroGPU Explorers&quot;,&quot;name&quot;:&quot;zero-gpu-explorers&quot;,&quot;userRole&quot;:&quot;read&quot;,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;isEnterprise&quot;:false,&quot;numUsers&quot;:753,&quot;canPay&quot;:false},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/631ce4b244503b72277fc89f/pcLUTLsvMQiR-ujlTgLYF.png&quot;,&quot;fullname&quot;:&quot;LeRobot&quot;,&quot;name&quot;:&quot;lerobot&quot;,&quot;userRole&quot;:&quot;write&quot;,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;details&quot;:&quot;State-of-the-art Machine Learning for real-world robotics&quot;,&quot;isEnterprise&quot;:false,&quot;numUsers&quot;:13,&quot;canPay&quot;:false},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/63691c3eda9b693c2730b2a2/WoOIHdJahrAnLo1wpyVjc.png&quot;,&quot;fullname&quot;:&quot;Journalists on Hugging Face&quot;,&quot;name&quot;:&quot;JournalistsonHF&quot;,&quot;userRole&quot;:&quot;admin&quot;,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;details&quot;:&quot;Democratizing access to useful AI tools and resources for journalists&quot;,&quot;isEnterprise&quot;:false,&quot;numUsers&quot;:366,&quot;canPay&quot;:false},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/6304c06eeb6d777a838eab63/qkILUu9lckQxgxfxOn2xm.png&quot;,&quot;fullname&quot;:&quot;Major TOM&quot;,&quot;name&quot;:&quot;Major-TOM&quot;,&quot;userRole&quot;:&quot;read&quot;,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;details&quot;:&quot;Earth Observation Datasets&quot;,&quot;isEnterprise&quot;:false,&quot;numUsers&quot;:79,&quot;canPay&quot;:false},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/623c830997ddced06d78699b/3qTjC7d3YFCJTwpxd2noq.png&quot;,&quot;fullname&quot;:&quot;MLX Community&quot;,&quot;name&quot;:&quot;mlx-community&quot;,&quot;userRole&quot;:&quot;contributor&quot;,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;isEnterprise&quot;:false,&quot;numUsers&quot;:2472,&quot;canPay&quot;:false},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/5f17f0a0925b9863e28ad517/nxmdd6m86cxu55UZBlQeg.jpeg&quot;,&quot;fullname&quot;:&quot;Social Post Explorers&quot;,&quot;name&quot;:&quot;social-post-explorers&quot;,&quot;userRole&quot;:&quot;read&quot;,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;isEnterprise&quot;:false,&quot;numUsers&quot;:863,&quot;canPay&quot;:false},{&quot;avatarUrl&quot;:&quot;https://www.gravatar.com/avatar/05f76a7a3db7a31f95ba71d0e79d83d9?d=retro&amp;size=100&quot;,&quot;fullname&quot;:&quot;Projet Spinoza&quot;,&quot;name&quot;:&quot;SpinozaProject&quot;,&quot;userRole&quot;:&quot;contributor&quot;,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;isEnterprise&quot;:false,&quot;numUsers&quot;:192,&quot;canPay&quot;:false},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/5f17f0a0925b9863e28ad517/V8fnWFEWwXTgCQuIHnPmk.png&quot;,&quot;fullname&quot;:&quot;Dev Mode Explorers&quot;,&quot;name&quot;:&quot;dev-mode-explorers&quot;,&quot;userRole&quot;:&quot;read&quot;,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;isEnterprise&quot;:false,&quot;numUsers&quot;:146,&quot;canPay&quot;:false},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/6459fa0f5b3111fbe83286e1/TCv1NK707PxgaE5XsXWOx.png&quot;,&quot;fullname&quot;:&quot;Hugging Face for Legal&quot;,&quot;name&quot;:&quot;HFforLegal&quot;,&quot;userRole&quot;:&quot;contributor&quot;,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;details&quot;:&quot;Breaking the opacity of language models for legal professionals 📖\r\n\r\nJoin us by smashing the button at top right 🤗&quot;,&quot;isEnterprise&quot;:false,&quot;numUsers&quot;:83,&quot;canPay&quot;:false},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/6340651b388c3fa40f9a5bc0/j6Vb_hutYuKRcQgMaDTAt.png&quot;,&quot;fullname&quot;:&quot;Hugging Face Discord Community&quot;,&quot;name&quot;:&quot;discord-community&quot;,&quot;userRole&quot;:&quot;read&quot;,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;details&quot;:&quot;Collaborating towards Good ML!&quot;,&quot;isEnterprise&quot;:false,&quot;numUsers&quot;:16311,&quot;canPay&quot;:false},{&quot;avatarUrl&quot;:&quot;https://www.gravatar.com/avatar/9cc01952b94dc65c12157d08eaa3c092?d=retro&amp;size=100&quot;,&quot;fullname&quot;:&quot;Big Science Social Impact Evaluation for Bias and Stereotypes&quot;,&quot;name&quot;:&quot;LanguageShades&quot;,&quot;userRole&quot;:&quot;write&quot;,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;details&quot;:&quot;datasets, social impact, bias, evaluation&quot;,&quot;isEnterprise&quot;:false,&quot;numUsers&quot;:24,&quot;canPay&quot;:true},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/60107b385ac3e86b3ea4fc34/jFu_9O8gk_aN9WFowX5jJ.jpeg&quot;,&quot;fullname&quot;:&quot;Dataset Tools&quot;,&quot;name&quot;:&quot;Dataset-Tools&quot;,&quot;userRole&quot;:&quot;admin&quot;,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;details&quot;:&quot;Tools for creating and exploring datasets&quot;,&quot;isEnterprise&quot;:false,&quot;numUsers&quot;:33,&quot;canPay&quot;:false},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/5e48005437cb5b49818287a5/oges-i7Dd9Fs0FDrh3bEs.png&quot;,&quot;fullname&quot;:&quot;Hugging Face Science&quot;,&quot;name&quot;:&quot;science&quot;,&quot;userRole&quot;:&quot;write&quot;,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;isEnterprise&quot;:false,&quot;numUsers&quot;:21,&quot;canPay&quot;:false},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/6202a599216215a22221dea9/rr6CrfvI8WRIMumnscdWq.png&quot;,&quot;fullname&quot;:&quot;Coordination Nationale pour l'IA&quot;,&quot;name&quot;:&quot;fr-gouv-coordination-ia&quot;,&quot;userRole&quot;:&quot;write&quot;,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;isEnterprise&quot;:false,&quot;numUsers&quot;:21,&quot;canPay&quot;:false},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/60107b385ac3e86b3ea4fc34/a9OUIjngSfobGiQhc_B6Z.png&quot;,&quot;fullname&quot;:&quot;Data Is Better Together Contributor&quot;,&quot;name&quot;:&quot;data-is-better-together-contributor&quot;,&quot;userRole&quot;:&quot;read&quot;,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;isEnterprise&quot;:false,&quot;numUsers&quot;:89,&quot;canPay&quot;:false},{&quot;avatarUrl&quot;:&quot;https://www.gravatar.com/avatar/2cc245ecb4e7dd7f0526018fce64190c?d=retro&amp;size=100&quot;,&quot;fullname&quot;:&quot;Sandbox&quot;,&quot;name&quot;:&quot;projects-sandbox&quot;,&quot;userRole&quot;:&quot;admin&quot;,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;isEnterprise&quot;:false,&quot;numUsers&quot;:5,&quot;canPay&quot;:true},{&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/651e96991b97c9f33d26bde6/QG_uzb2VV3OeKO0c61ynh.png&quot;,&quot;fullname&quot;:&quot;Open R1&quot;,&quot;name&quot;:&quot;open-r1&quot;,&quot;userRole&quot;:&quot;write&quot;,&quot;type&quot;:&quot;org&quot;,&quot;isHf&quot;:false,&quot;isEnterprise&quot;:true,&quot;numUsers&quot;:31,&quot;xetWaitlist&quot;:{&quot;joinedAt&quot;:&quot;2025-03-18T14:49:56.476Z&quot;,&quot;joinedBy&quot;:{&quot;userId&quot;:&quot;5f0c746619cb630495b814fd&quot;,&quot;user&quot;:&quot;lewtun&quot;,&quot;requestId&quot;:&quot;Root=1-67d98813-4618473c50aaae7d7c4b1735&quot;},&quot;status&quot;:&quot;pending&quot;},&quot;canPay&quot;:false}],&quot;signup&quot;:{&quot;github&quot;:&quot;fdaudens&quot;,&quot;twitter&quot;:&quot;fdaudens&quot;,&quot;details&quot;:&quot;AI &amp; Journalism&quot;,&quot;homepage&quot;:&quot;&quot;,&quot;linkedin&quot;:&quot;fdaudens&quot;,&quot;bluesky&quot;:&quot;fdaudens.bsky.social&quot;},&quot;isHf&quot;:true,&quot;isMod&quot;:false,&quot;type&quot;:&quot;user&quot;,&quot;canPay&quot;:true,&quot;spacesAvailableFlavors&quot;:[&quot;cpu-basic&quot;,&quot;cpu-upgrade&quot;,&quot;cpu-xl&quot;,&quot;zero-a10g&quot;,&quot;t4-small&quot;,&quot;t4-medium&quot;,&quot;l4x1&quot;,&quot;l4x4&quot;,&quot;l40sx1&quot;,&quot;l40sx4&quot;,&quot;l40sx8&quot;,&quot;a10g-small&quot;,&quot;a10g-large&quot;,&quot;a10g-largex2&quot;,&quot;a10g-largex4&quot;,&quot;a100-large&quot;,&quot;h100&quot;,&quot;h100x8&quot;,&quot;v5e-1x1&quot;,&quot;v5e-2x2&quot;,&quot;v5e-2x4&quot;],&quot;canPost&quot;:true},&quot;sessionUuid&quot;:&quot;x9z-lU0W3q-euBgG3RMdR&quot;}">
<header class="bg-linear-to-t border-b border-gray-100 pt-4 xl:pt-0 from-gray-50-to-white via-white dark:via-gray-950"><div class="container relative flex flex-col xl:flex-row"><h1 class="flex flex-wrap items-center max-md:leading-tight gap-y-1 text-lg xl:flex-none"><a href="/spaces" class="group flex items-center"><svg class="sm:mr-1 false text-gray-400" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M7.80914 18.7462V24.1907H13.2536V18.7462H7.80914Z" fill="#FF3270"></path><path d="M18.7458 18.7462V24.1907H24.1903V18.7462H18.7458Z" fill="#861FFF"></path><path d="M7.80914 7.80982V13.2543H13.2536V7.80982H7.80914Z" fill="#097EFF"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M4 6.41775C4 5.08246 5.08246 4 6.41775 4H14.6457C15.7626 4 16.7026 4.75724 16.9802 5.78629C18.1505 4.67902 19.7302 4 21.4685 4C25.0758 4 28.0003 6.92436 28.0003 10.5317C28.0003 12.27 27.3212 13.8497 26.2139 15.02C27.243 15.2977 28.0003 16.2376 28.0003 17.3545V25.5824C28.0003 26.9177 26.9177 28.0003 25.5824 28.0003H17.0635H14.9367H6.41775C5.08246 28.0003 4 26.9177 4 25.5824V15.1587V14.9367V6.41775ZM7.80952 7.80952V13.254H13.254V7.80952H7.80952ZM7.80952 24.1907V18.7462H13.254V24.1907H7.80952ZM18.7462 24.1907V18.7462H24.1907V24.1907H18.7462ZM18.7462 10.5317C18.7462 9.0283 19.9651 7.80952 21.4685 7.80952C22.9719 7.80952 24.1907 9.0283 24.1907 10.5317C24.1907 12.0352 22.9719 13.254 21.4685 13.254C19.9651 13.254 18.7462 12.0352 18.7462 10.5317Z" fill="black"></path><path d="M21.4681 7.80982C19.9647 7.80982 18.7458 9.02861 18.7458 10.5321C18.7458 12.0355 19.9647 13.2543 21.4681 13.2543C22.9715 13.2543 24.1903 12.0355 24.1903 10.5321C24.1903 9.02861 22.9715 7.80982 21.4681 7.80982Z" fill="#FFD702"></path></svg>
<span class="mr-2.5 font-semibold text-gray-400 group-hover:text-gray-500 max-sm:hidden">Spaces:</span></a>
<hr class="mx-1.5 h-2 translate-y-px rounded-sm border-r dark:border-gray-600 sm:hidden">
<div class="group flex flex-none items-center"><div class="relative mr-1 flex items-center">
<span class="inline-block "><span class="contents"><a href="/fdaudens" class="text-gray-400 hover:text-blue-600"><img alt="" class="w-3.5 h-3.5 rounded-full flex-none" src="https://cdn-avatars.huggingface.co/v1/production/uploads/647f36a8454af0237bd49574/jshkqBUTY-GZL8As8y6Aq.jpeg" crossorigin="anonymous"></a></span>
</span></div>
<span class="inline-block "><span class="contents"><a href="/fdaudens" class="text-gray-400 hover:text-blue-600">fdaudens</a></span>
</span>
<div class="mx-0.5 text-gray-300">/</div></div>
<div class="max-w-full xl:flex xl:min-w-0 xl:flex-nowrap xl:items-center xl:gap-x-1"><a class="break-words font-mono font-semibold hover:text-blue-600 text-[1.07rem] xl:truncate" href="/spaces/fdaudens/test-app">test-app</a>
<button class="relative text-xs mr-3 focus:outline-hidden inline-flex cursor-pointer items-center text-sm mx-0.5 text-gray-600 " title="Copy space name to clipboard" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg>
</button></div>
<div class="inline-flex h-5 items-center rounded-sm border border-gray-200 px-1.5 text-xs leading-none text-gray-500 mr-2">private
</div>
<span class="inline-block "><span class="contents"><div class="cursor-pointer select-none overflow-hidden font-mono text-xs shrink-0 mr-2 flex items-center rounded-lg border leading-none dark:bg-gray-900
border-green-100
text-green-700 dark:text-green-500"><div class="inline-flex items-center px-2 py-[0.32rem] dark:bg-gray-900 border-green-100 bg-green-50 hover:bg-green-100/70 hover:text-green-800 dark:hover:text-green-400">
<div class="ml-0.5 mr-1.5 inline-block h-1.5 w-1.5 animate-pulse rounded-full bg-green-500"></div>
Running
</div>
</div></span>
</span>
<button class="focus:outline-hidden mr-2 inline-flex items-center overflow-hidden whitespace-nowrap rounded-md border bg-white px-1.5 py-1 text-sm leading-none text-gray-500 hover:bg-gray-50 focus:bg-gray-100 dark:hover:bg-gray-900 dark:focus:bg-gray-800"><svg class="2xl:mr-1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path fill="currentColor" d="M4 6h18v2H4zm0 6h18v2H4zm0 6h12v2H4zm17 0l7 5l-7 5V18z"></path></svg><span class="hidden 2xl:block">Logs</span></button>
<div class="sm:hidden"><div class="relative ">
<button class="btn px-1 py-1 text-sm translate-y-0 " type="button">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="p-px" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><circle cx="16" cy="7" r="3" fill="currentColor"></circle><circle cx="16" cy="16" r="3" fill="currentColor"></circle><circle cx="16" cy="25" r="3" fill="currentColor"></circle></svg>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" class="absolute right-[-0.25rem] bottom-[-0.25rem] rounded-xs bg-gray-50 p-px text-[0.85rem] text-gray-500 dark:bg-gray-925" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 12 12"><path fill="currentColor" d="M7.975 3.489a.438.438 0 0 1 0 .618L4.262 7.82a.416.416 0 0 1-.307.126.427.427 0 0 1-.311-.126.438.438 0 0 1 0-.618L7.357 3.49a.438.438 0 0 1 .618 0ZM6.427 8.132 4.88 9.675a2.17 2.17 0 0 1-3.09 0 2.188 2.188 0 0 1 0-3.09l1.542-1.548a.437.437 0 0 0-.618-.619L1.166 5.966a3.063 3.063 0 0 0 4.332 4.332L7.046 8.75a.438.438 0 0 0-.619-.618Zm4.026-7.121a3.063 3.063 0 0 0-4.332 0L4.573 2.559a.438.438 0 0 0 .618.618L6.74 1.635a2.171 2.171 0 0 1 3.09 0 2.188 2.188 0 0 1 0 3.09L8.287 6.273a.432.432 0 0 0 0 .618.421.421 0 0 0 .475.097.438.438 0 0 0 .143-.097l1.548-1.548a3.068 3.068 0 0 0 0-4.332Z"></path></svg>
</button>
</div></div>
</h1>
<div class="flex flex-col-reverse gap-x-2 sm:flex-row sm:items-center sm:justify-between xl:ml-auto"><div class="-mb-px flex h-12 items-center overflow-x-auto overflow-y-hidden sm:h-[3.25rem]">
<a class="tab-alternate" href="/spaces/fdaudens/test-app"><svg class="mr-1.5 text-gray-400 flex-none" style="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path class="uim-quaternary" d="M20.23 7.24L12 12L3.77 7.24a1.98 1.98 0 0 1 .7-.71L11 2.76c.62-.35 1.38-.35 2 0l6.53 3.77c.29.173.531.418.7.71z" opacity=".25" fill="currentColor"></path><path class="uim-tertiary" d="M12 12v9.5a2.09 2.09 0 0 1-.91-.21L4.5 17.48a2.003 2.003 0 0 1-1-1.73v-7.5a2.06 2.06 0 0 1 .27-1.01L12 12z" opacity=".5" fill="currentColor"></path><path class="uim-primary" d="M20.5 8.25v7.5a2.003 2.003 0 0 1-1 1.73l-6.62 3.82c-.275.13-.576.198-.88.2V12l8.23-4.76c.175.308.268.656.27 1.01z" fill="currentColor"></path></svg>
App
</a><a class="tab-alternate active" href="/spaces/fdaudens/test-app/tree/main"><svg class="mr-1.5 text-gray-400 flex-none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path class="uim-tertiary" d="M21 19h-8a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2zm0-4h-8a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2zm0-8h-8a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2zm0 4h-8a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2z" opacity=".5" fill="currentColor"></path><path class="uim-primary" d="M9 19a1 1 0 0 1-1-1V6a1 1 0 0 1 2 0v12a1 1 0 0 1-1 1zm-6-4.333a1 1 0 0 1-.64-1.769L3.438 12l-1.078-.898a1 1 0 0 1 1.28-1.538l2 1.667a1 1 0 0 1 0 1.538l-2 1.667a.999.999 0 0 1-.64.231z" fill="currentColor"></path></svg>
<span class="xl:hidden">Files</span>
<span class="hidden xl:inline">Files</span>
</a><a class="tab-alternate" href="/spaces/fdaudens/test-app/discussions"><svg class="mr-1.5 text-gray-400 flex-none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M20.6081 3C21.7684 3 22.8053 3.49196 23.5284 4.38415C23.9756 4.93678 24.4428 5.82749 24.4808 7.16133C24.9674 7.01707 25.4353 6.93643 25.8725 6.93643C26.9833 6.93643 27.9865 7.37587 28.696 8.17411C29.6075 9.19872 30.0124 10.4579 29.8361 11.7177C29.7523 12.3177 29.5581 12.8555 29.2678 13.3534C29.8798 13.8646 30.3306 14.5763 30.5485 15.4322C30.719 16.1032 30.8939 17.5006 29.9808 18.9403C30.0389 19.0342 30.0934 19.1319 30.1442 19.2318C30.6932 20.3074 30.7283 21.5229 30.2439 22.6548C29.5093 24.3704 27.6841 25.7219 24.1397 27.1727C21.9347 28.0753 19.9174 28.6523 19.8994 28.6575C16.9842 29.4379 14.3477 29.8345 12.0653 29.8345C7.87017 29.8345 4.8668 28.508 3.13831 25.8921C0.356375 21.6797 0.754104 17.8269 4.35369 14.1131C6.34591 12.058 7.67023 9.02782 7.94613 8.36275C8.50224 6.39343 9.97271 4.20438 12.4172 4.20438H12.4179C12.6236 4.20438 12.8314 4.2214 13.0364 4.25468C14.107 4.42854 15.0428 5.06476 15.7115 6.02205C16.4331 5.09583 17.134 4.359 17.7682 3.94323C18.7242 3.31737 19.6794 3 20.6081 3ZM20.6081 5.95917C20.2427 5.95917 19.7963 6.1197 19.3039 6.44225C17.7754 7.44319 14.8258 12.6772 13.7458 14.7131C13.3839 15.3952 12.7655 15.6837 12.2086 15.6837C11.1036 15.6837 10.2408 14.5497 12.1076 13.1085C14.9146 10.9402 13.9299 7.39584 12.5898 7.1776C12.5311 7.16799 12.4731 7.16355 12.4172 7.16355C11.1989 7.16355 10.6615 9.33114 10.6615 9.33114C10.6615 9.33114 9.0863 13.4148 6.38031 16.206C3.67434 18.998 3.5346 21.2388 5.50675 24.2246C6.85185 26.2606 9.42666 26.8753 12.0653 26.8753C14.8021 26.8753 17.6077 26.2139 19.1799 25.793C19.2574 25.7723 28.8193 22.984 27.6081 20.6107C27.4046 20.212 27.0693 20.0522 26.6471 20.0522C24.9416 20.0522 21.8393 22.6726 20.5057 22.6726C20.2076 22.6726 19.9976 22.5416 19.9116 22.222C19.3433 20.1173 28.552 19.2325 27.7758 16.1839C27.639 15.6445 27.2677 15.4256 26.746 15.4263C24.4923 15.4263 19.4358 19.5181 18.3759 19.5181C18.2949 19.5181 18.2368 19.4937 18.2053 19.4419C17.6743 18.557 17.9653 17.9394 21.7082 15.6009C25.4511 13.2617 28.0783 11.8545 26.5841 10.1752C26.4121 9.98141 26.1684 9.8956 25.8725 9.8956C23.6001 9.89634 18.2311 14.9403 18.2311 14.9403C18.2311 14.9403 16.7821 16.496 15.9057 16.496C15.7043 16.496 15.533 16.4139 15.4169 16.2112C14.7956 15.1296 21.1879 10.1286 21.5484 8.06535C21.7928 6.66715 21.3771 5.95917 20.6081 5.95917Z" fill="#FF9D00"></path><path d="M5.50686 24.2246C3.53472 21.2387 3.67446 18.9979 6.38043 16.206C9.08641 13.4147 10.6615 9.33111 10.6615 9.33111C10.6615 9.33111 11.2499 6.95933 12.59 7.17757C13.93 7.39581 14.9139 10.9401 12.1069 13.1084C9.29997 15.276 12.6659 16.7489 13.7459 14.713C14.8258 12.6772 17.7747 7.44316 19.304 6.44221C20.8326 5.44128 21.9089 6.00204 21.5484 8.06532C21.188 10.1286 14.795 15.1295 15.4171 16.2118C16.0391 17.2934 18.2312 14.9402 18.2312 14.9402C18.2312 14.9402 25.0907 8.49588 26.5842 10.1752C28.0776 11.8545 25.4512 13.2616 21.7082 15.6008C17.9646 17.9393 17.6744 18.557 18.2054 19.4418C18.7372 20.3266 26.9998 13.1351 27.7759 16.1838C28.5513 19.2324 19.3434 20.1173 19.9117 22.2219C20.48 24.3274 26.3979 18.2382 27.6082 20.6107C28.8193 22.9839 19.2574 25.7722 19.18 25.7929C16.0914 26.62 8.24723 28.3726 5.50686 24.2246Z" fill="#FFD21E"></path></svg>
Community
</a><a class="tab-alternate" href="/spaces/fdaudens/test-app/settings"><svg class="opacity-50 dark:opacity-70 mr-1.5 text-gray-400 flex-none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 25 25" fill="currentColor"><path d="M13.0101 3C13.7157 3.0078 14.4184 3.09062 15.1077 3.24652C15.2543 3.2797 15.3871 3.35848 15.4874 3.47186C15.5877 3.58523 15.6506 3.72754 15.6672 3.8789L15.8306 5.36678C15.8537 5.57655 15.925 5.77791 16.0389 5.95464C16.1527 6.13137 16.3059 6.27854 16.4861 6.38432C16.6663 6.4901 16.8685 6.55153 17.0764 6.56367C17.2843 6.57581 17.4921 6.53831 17.6831 6.4542L19.0299 5.85495C19.1667 5.79391 19.3187 5.77743 19.4651 5.8078C19.6115 5.83818 19.745 5.9139 19.847 6.02449C20.8199 7.07789 21.5443 8.3412 21.9658 9.71937C22.01 9.8642 22.0087 10.0194 21.962 10.1634C21.9153 10.3074 21.8256 10.4332 21.7053 10.5232L20.5113 11.4158C20.3434 11.5408 20.2069 11.7041 20.1128 11.8925C20.0187 12.0809 19.9697 12.2891 19.9697 12.5003C19.9697 12.7114 20.0187 12.9196 20.1128 13.108C20.2069 13.2964 20.3434 13.4597 20.5113 13.5848L21.7062 14.4763C21.8269 14.5663 21.917 14.6922 21.9638 14.8364C22.0107 14.9806 22.0121 15.1361 21.9677 15.2812C21.546 16.6593 20.8216 17.9225 19.849 18.976C19.7471 19.0864 19.6141 19.162 19.4681 19.1926C19.3221 19.2231 19.1704 19.207 19.0338 19.1466L17.6812 18.5454C17.4904 18.4606 17.2827 18.4225 17.0748 18.4343C16.8668 18.446 16.6645 18.5072 16.4842 18.6129C16.3039 18.7185 16.1508 18.8658 16.037 19.0426C15.9233 19.2195 15.8523 19.421 15.8297 19.6308L15.6672 21.1177C15.6508 21.2674 15.5892 21.4084 15.4908 21.5212C15.3923 21.6341 15.2619 21.7133 15.1173 21.7482C13.7249 22.0839 12.2742 22.0839 10.8817 21.7482C10.7371 21.7133 10.6067 21.6341 10.5083 21.5212C10.4098 21.4084 10.3482 21.2674 10.3318 21.1177L10.1703 19.6328C10.1468 19.4235 10.0751 19.2227 9.96107 19.0465C9.84703 18.8704 9.69381 18.7238 9.51373 18.6186C9.33364 18.5134 9.13172 18.4525 8.92419 18.4408C8.71666 18.4291 8.50931 18.4669 8.31882 18.5512L6.9672 19.1514C6.83048 19.2121 6.67854 19.2283 6.53235 19.1978C6.38616 19.1672 6.25292 19.0915 6.15103 18.9809C5.17789 17.9263 4.45346 16.6616 4.03227 15.2821C3.98795 15.1371 3.98931 14.9816 4.03617 14.8374C4.08304 14.6931 4.17306 14.5673 4.29375 14.4773L5.48868 13.5848C5.65676 13.4599 5.79345 13.2966 5.88768 13.1082C5.9819 12.9198 6.031 12.7115 6.031 12.5003C6.031 12.289 5.9819 12.0808 5.88768 11.8923C5.79345 11.7039 5.65676 11.5407 5.48868 11.4158L4.29375 10.5252C4.17324 10.4351 4.0834 10.3092 4.03671 10.1649C3.99003 10.0207 3.98881 9.8653 4.03323 9.72034C4.45479 8.34219 5.17922 7.07889 6.15199 6.02547C6.25407 5.91487 6.38753 5.83915 6.53391 5.80878C6.6803 5.77841 6.83238 5.79488 6.96912 5.85593L8.31498 6.45517C8.5063 6.53923 8.71441 6.57664 8.92258 6.56439C9.13075 6.55214 9.33319 6.49057 9.51363 6.38462C9.69406 6.27868 9.84747 6.13132 9.96152 5.95438C10.0756 5.77744 10.1471 5.57585 10.1703 5.36581L10.3338 3.8789C10.3503 3.72724 10.4132 3.58462 10.5137 3.47103C10.6142 3.35745 10.7473 3.2786 10.8942 3.24555C11.5835 3.09062 12.2881 3.00877 13.0101 3ZM12.9986 9.57711C12.2337 9.57711 11.5001 9.88508 10.9593 10.4333C10.4184 10.9815 10.1146 11.725 10.1146 12.5003C10.1146 13.2755 10.4184 14.0191 10.9593 14.5672C11.5001 15.1154 12.2337 15.4234 12.9986 15.4234C13.7634 15.4234 14.497 15.1154 15.0378 14.5672C15.5787 14.0191 15.8825 13.2755 15.8825 12.5003C15.8825 11.725 15.5787 10.9815 15.0378 10.4333C14.497 9.88508 13.7634 9.57711 12.9986 9.57711Z"></path></svg>
Settings
</a></div>
<div class="hidden sm:block mt-2 lg:mt-0"><div class="relative ">
<button class="btn px-1 py-1 text-base translate-y-px " type="button">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="p-0.5" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><circle cx="16" cy="7" r="3" fill="currentColor"></circle><circle cx="16" cy="16" r="3" fill="currentColor"></circle><circle cx="16" cy="25" r="3" fill="currentColor"></circle></svg>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" class="absolute right-[-0.18rem] bottom-[-0.18rem] rounded-xs bg-gray-50 p-px text-[0.85rem] text-gray-500 dark:bg-gray-925" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 12 12"><path fill="currentColor" d="M7.975 3.489a.438.438 0 0 1 0 .618L4.262 7.82a.416.416 0 0 1-.307.126.427.427 0 0 1-.311-.126.438.438 0 0 1 0-.618L7.357 3.49a.438.438 0 0 1 .618 0ZM6.427 8.132 4.88 9.675a2.17 2.17 0 0 1-3.09 0 2.188 2.188 0 0 1 0-3.09l1.542-1.548a.437.437 0 0 0-.618-.619L1.166 5.966a3.063 3.063 0 0 0 4.332 4.332L7.046 8.75a.438.438 0 0 0-.619-.618Zm4.026-7.121a3.063 3.063 0 0 0-4.332 0L4.573 2.559a.438.438 0 0 0 .618.618L6.74 1.635a2.171 2.171 0 0 1 3.09 0 2.188 2.188 0 0 1 0 3.09L8.287 6.273a.432.432 0 0 0 0 .618.421.421 0 0 0 .475.097.438.438 0 0 0 .143-.097l1.548-1.548a3.068 3.068 0 0 0 0-4.332Z"></path></svg>
</button>
</div></div>
</div></div></header>
<div class="spinner-overlay fixed inset-0 z-50 flex h-full w-full items-center justify-center overflow-y-auto bg-gray-500 text-white opacity-80 hidden"><svg class="animate-spin -ml-1 mr-3 h-5 w-5 text-white" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" fill="none" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path></svg>
<span>Fetching metadata from the HF Docker repository...</span></div>
</div>
<div class="container relative flex flex-col md:grid md:space-y-0 w-full md:grid-cols-12 space-y-4 md:gap-6 mb-16"><section class="pt-8 border-gray-100 col-span-full"><header class="flex flex-wrap items-center justify-start pb-2 md:justify-end lg:flex-nowrap"><div class="grow max-md:flex max-md:w-full max-md:items-start max-md:justify-between"><div class="relative mr-4 flex min-w-0 basis-auto flex-wrap items-center md:grow md:basis-full lg:basis-auto lg:flex-nowrap"><div class="SVELTE_HYDRATER contents" data-target="BranchSelector" data-props="{&quot;path&quot;:&quot;app.py&quot;,&quot;repoName&quot;:&quot;fdaudens/test-app&quot;,&quot;repoType&quot;:&quot;space&quot;,&quot;rev&quot;:&quot;main&quot;,&quot;refs&quot;:{&quot;branches&quot;:[{&quot;name&quot;:&quot;main&quot;,&quot;ref&quot;:&quot;refs/heads/main&quot;,&quot;targetCommit&quot;:&quot;863ba7428fb6bea75c3307d20c7137e1ba531a15&quot;}],&quot;tags&quot;:[],&quot;converts&quot;:[]},&quot;view&quot;:&quot;blob&quot;}"><div class="relative mr-4 mb-2">
<button class="text-sm md:text-base btn w-full cursor-pointer text-sm" type="button">
<svg class="mr-1.5 text-gray-700 dark:text-gray-400" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24" style="transform: rotate(360deg);"><path d="M13 14c-3.36 0-4.46 1.35-4.82 2.24C9.25 16.7 10 17.76 10 19a3 3 0 0 1-3 3a3 3 0 0 1-3-3c0-1.31.83-2.42 2-2.83V7.83A2.99 2.99 0 0 1 4 5a3 3 0 0 1 3-3a3 3 0 0 1 3 3c0 1.31-.83 2.42-2 2.83v5.29c.88-.65 2.16-1.12 4-1.12c2.67 0 3.56-1.34 3.85-2.23A3.006 3.006 0 0 1 14 7a3 3 0 0 1 3-3a3 3 0 0 1 3 3c0 1.34-.88 2.5-2.09 2.86C17.65 11.29 16.68 14 13 14m-6 4a1 1 0 0 0-1 1a1 1 0 0 0 1 1a1 1 0 0 0 1-1a1 1 0 0 0-1-1M7 4a1 1 0 0 0-1 1a1 1 0 0 0 1 1a1 1 0 0 0 1-1a1 1 0 0 0-1-1m10 2a1 1 0 0 0-1 1a1 1 0 0 0 1 1a1 1 0 0 0 1-1a1 1 0 0 0-1-1z" fill="currentColor"></path></svg>
main
<svg class="-mr-1 text-gray-500" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path d="M16.293 9.293L12 13.586L7.707 9.293l-1.414 1.414L12 16.414l5.707-5.707z" fill="currentColor"></path></svg></button>
</div></div>
<div class="relative mb-2 flex flex-wrap items-center"><a class="truncate text-gray-800 hover:underline" href="/spaces/fdaudens/test-app/tree/main">test-app</a>
<span class="mx-1 text-gray-300">/</span>
<span class="dark:text-gray-300">app.py</span>
<div class="SVELTE_HYDRATER contents" data-target="CopyButton" data-props="{&quot;value&quot;:&quot;app.py&quot;,&quot;classNames&quot;:&quot;text-xs ml-2&quot;,&quot;title&quot;:&quot;Copy path&quot;}"><button class="relative text-xs ml-2 focus:outline-hidden inline-flex cursor-pointer items-center text-sm mx-0.5 text-gray-600 " title="Copy path" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg>
</button></div></div></div>
</div>
</header>
<div class="SVELTE_HYDRATER contents" data-target="LastCommit" data-props="{&quot;commitLast&quot;:{&quot;date&quot;:&quot;2025-03-25T20:41:36.000Z&quot;,&quot;verified&quot;:&quot;verified&quot;,&quot;subject&quot;:&quot;Update app.py&quot;,&quot;authors&quot;:[{&quot;_id&quot;:&quot;647f36a8454af0237bd49574&quot;,&quot;avatar&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/647f36a8454af0237bd49574/jshkqBUTY-GZL8As8y6Aq.jpeg&quot;,&quot;isHf&quot;:true,&quot;user&quot;:&quot;fdaudens&quot;}],&quot;commit&quot;:{&quot;id&quot;:&quot;863ba7428fb6bea75c3307d20c7137e1ba531a15&quot;,&quot;parentIds&quot;:[&quot;434247205b852c33a8838fae9a46cfa6c7166778&quot;]},&quot;title&quot;:&quot;Update app.py&quot;},&quot;repo&quot;:{&quot;name&quot;:&quot;fdaudens/test-app&quot;,&quot;type&quot;:&quot;space&quot;}}"><div class="from-gray-100-to-white bg-linear-to-t flex flex-wrap items-baseline rounded-t-lg border border-b-0 px-3 py-2 dark:border-gray-800"><img class="mr-2.5 mt-0.5 h-4 w-4 self-center rounded-full" alt="fdaudens's picture" src="https://cdn-avatars.huggingface.co/v1/production/uploads/647f36a8454af0237bd49574/jshkqBUTY-GZL8As8y6Aq.jpeg">
<div class="mr-4 flex flex-none items-center truncate"><a class="hover:underline" href="/fdaudens">fdaudens
</a>
<span class="max-w-[175px] truncate border font-semibold leading-snug sm:max-w-xs rounded-sm px-1 border-yellow-100 bg-yellow-50 text-yellow-500 dark:bg-yellow-800 dark:text-yellow-400 text-xs mt-0.5 ml-1.5 uppercase" title="member of the Hugging Face team">HF staff</span>
</div>
<div class="mr-4 truncate font-mono text-sm text-gray-500 hover:prose-a:underline"><!-- HTML_TAG_START -->Update app.py<!-- HTML_TAG_END --></div>
<a class="rounded-sm border bg-gray-50 px-1.5 text-sm hover:underline dark:border-gray-800 dark:bg-gray-900" href="/spaces/fdaudens/test-app/commit/863ba7428fb6bea75c3307d20c7137e1ba531a15">863ba74</a>
<span class="mx-2 text-green-500 dark:text-green-600 px-1.5 border-green-100 dark:border-green-800 rounded-full border text-xs uppercase" title="This commit is signed and the signature is verified">verified</span>
<time class="ml-auto hidden flex-none truncate pl-2 text-gray-500 dark:text-gray-400 lg:block" datetime="2025-03-25T20:41:36" title="Tue, 25 Mar 2025 20:41:36 GMT">6 minutes ago</time></div></div>
<div class="relative flex flex-wrap items-center border px-3 py-1.5 text-sm text-gray-800 dark:border-gray-800 dark:bg-gray-900 ">
<a class="my-1 mr-4 flex items-center hover:underline " href="/spaces/fdaudens/test-app/raw/main/app.py"><svg class="mr-1.5" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32" style="transform: rotate(360deg);"><path d="M31 16l-7 7l-1.41-1.41L28.17 16l-5.58-5.59L24 9l7 7z" fill="currentColor"></path><path d="M1 16l7-7l1.41 1.41L3.83 16l5.58 5.59L8 23l-7-7z" fill="currentColor"></path><path d="M12.419 25.484L17.639 6l1.932.518L14.35 26z" fill="currentColor"></path></svg>
raw
</a><div class="SVELTE_HYDRATER contents" data-target="CopyButton" data-props="{&quot;value&quot;:&quot;https://huggingface.co/spaces/fdaudens/test-app/resolve/main/app.py&quot;,&quot;style&quot;:&quot;blank&quot;,&quot;label&quot;:&quot;Copy download link&quot;,&quot;classNames&quot;:&quot;my-1 mr-4 flex items-center no-underline hover:underline&quot;}"><button class="relative my-1 mr-4 flex items-center no-underline hover:underline " title="Copy download link" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg>
<span class="ml-1.5 ">Copy download link</span>
</button></div><a class="my-1 mr-4 flex items-center hover:underline " href="/spaces/fdaudens/test-app/commits/main/app.py"><svg class="mr-1.5" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32" style="transform: rotate(360deg);"><path d="M16 4C9.383 4 4 9.383 4 16s5.383 12 12 12s12-5.383 12-12S22.617 4 16 4zm0 2c5.535 0 10 4.465 10 10s-4.465 10-10 10S6 21.535 6 16S10.465 6 16 6zm-1 2v9h7v-2h-5V8z" fill="currentColor"></path></svg>
history
</a><a class="my-1 mr-4 flex items-center hover:underline " href="/spaces/fdaudens/test-app/blame/main/app.py"><svg class="mr-1.5" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32" style="transform: rotate(360deg);"><path d="M16 2a14 14 0 1 0 14 14A14 14 0 0 0 16 2zm0 26a12 12 0 1 1 12-12a12 12 0 0 1-12 12z" fill="currentColor"></path><path d="M11.5 11a2.5 2.5 0 1 0 2.5 2.5a2.48 2.48 0 0 0-2.5-2.5z" fill="currentColor"></path><path d="M20.5 11a2.5 2.5 0 1 0 2.5 2.5a2.48 2.48 0 0 0-2.5-2.5z" fill="currentColor"></path></svg>
blame
</a><a class="my-1 mr-4 flex items-center hover:underline " href="/spaces/fdaudens/test-app/edit/main/app.py"><svg class="mr-1.5" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M2 26h28v2H2z" fill="currentColor"></path><path d="M25.4 9c.8-.8.8-2 0-2.8l-3.6-3.6c-.8-.8-2-.8-2.8 0l-15 15V24h6.4l15-15zm-5-5L24 7.6l-3 3L17.4 7l3-3zM6 22v-3.6l10-10l3.6 3.6l-10 10H6z" fill="currentColor"></path></svg>
edit
</a><a class="my-1 mr-4 flex items-center hover:underline " href="/spaces/fdaudens/test-app/delete/main/app.py"><svg class="mr-1.5" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M12 12h2v12h-2z" fill="currentColor"></path><path d="M18 12h2v12h-2z" fill="currentColor"></path><path d="M4 6v2h2v20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8h2V6zm4 22V8h16v20z" fill="currentColor"></path><path d="M12 2h8v2h-8z" fill="currentColor"></path></svg>
delete
</a>
<div class="mr-4 flex items-center"><div class="SVELTE_HYDRATER contents" data-target="ScanStatusBadge" data-props="{&quot;classNames&quot;:&quot;mr-2&quot;,&quot;scanStatus&quot;:{&quot;status&quot;:&quot;safe&quot;,&quot;protectAiScan&quot;:{&quot;status&quot;:&quot;unscanned&quot;},&quot;avScan&quot;:{&quot;status&quot;:&quot;safe&quot;},&quot;pickleImportScan&quot;:{&quot;status&quot;:&quot;unscanned&quot;,&quot;pickleImports&quot;:[]}},&quot;repo&quot;:{&quot;_id&quot;:&quot;67e2f860eadc3d7fa19deb80&quot;,&quot;gitalyUid&quot;:&quot;337c3fe45698a3d2163cf315f95849e1cc035d2a728ee70dc9fc6b14e7ba528e&quot;,&quot;type&quot;:&quot;space&quot;,&quot;name&quot;:&quot;fdaudens/test-app&quot;,&quot;config&quot;:{&quot;private&quot;:true,&quot;gated&quot;:false,&quot;discussionsDisabled&quot;:false,&quot;duplicationDisabled&quot;:false,&quot;region&quot;:&quot;us&quot;,&quot;gitaly&quot;:{&quot;storage&quot;:&quot;default&quot;,&quot;repoUid&quot;:&quot;337c3fe45698a3d2163cf315f95849e1cc035d2a728ee70dc9fc6b14e7ba528e&quot;,&quot;region&quot;:&quot;us&quot;},&quot;lfs&quot;:{&quot;bucket&quot;:&quot;hf-hub-lfs-us-east-1&quot;,&quot;prefix&quot;:&quot;repos/33/7c/337c3fe45698a3d2163cf315f95849e1cc035d2a728ee70dc9fc6b14e7ba528e&quot;,&quot;usedStorage&quot;:0},&quot;xet&quot;:{&quot;enabled&quot;:false,&quot;bucket&quot;:&quot;xet-bridge-us&quot;,&quot;service&quot;:&quot;cas&quot;},&quot;spaces&quot;:{&quot;hardware&quot;:&quot;cpu-basic&quot;,&quot;storage&quot;:null,&quot;gcTimeout&quot;:172800,&quot;replicas&quot;:1},&quot;secretsEncrypted&quot;:{&quot;HF_TOKEN&quot;:{&quot;keyId&quot;:&quot;1717581985&quot;,&quot;encrypted&quot;:&quot;pPyMSPfMUqGyrOOGdcYHN+1Ld2TKpjqcodz57TBAxZjX68X9Fl3rrgx4YzZj4FwzMgU3mWY84GWPzm86OgniGSFX+nZKDSXwMudCM/Dez4FV1mPjosGPzjhsKxVDjU3Av7lSZEsRr/qN9b3crz25UVnOwt7V7GA261a/BUF+6XLn8vbZvsR4fhgJXtD3Fm0+x5Jldc0j1S6Hm5S2W7E6eVwmo8kwq/BphRCWBCn+hkYWoy6AgBVltKRxMU37/Sf9rKz6powq0j7TYvaI3GR2B43npHcJLxnkzNeGkEUSIgVfU3UHe1LhQOoX6YUoO6NO9wtubozdg3t4uY9cQl9NWs9Ct1lD6NE5QdH7FWRZePJmhl1iMHUFDJJndg/qBoLEeAJnoa3f3RFhGnBaZz6i799iXxmf2B3uEkF8qf6gwb5Yf9sOhDtaLAsT97AxSAOFJKkV6Lt+K/FAYMgdJsnLahnudUJS7orJs7ensqy+RzDxrnul80l8/A87QdCsGsk/UA16CPZXnexIY7GNJdNmWmh3ViCu01GX58MIujlfAi62FyFHPvRQ+MEFgwIHN4dlf9Y1k95Dnq17CPoRGYrNribPQ+u7ZFJbTmJS8DGME2173G007ZZ1TRCSbfpu7GfXHk/JBlyCjPIbaZbgrharZv5UPzsJZ+BPtblI6nTsXbY=:SJv2tEJ5qzK5pN491rzfcVy+Tajyv4EYp+9m34jRRuP7rOA85A==&quot;,&quot;updatedAt&quot;:&quot;2025-03-25T20:27:41.021Z&quot;}}},&quot;updatedAt&quot;:&quot;2025-03-25T18:39:31.175Z&quot;,&quot;authorId&quot;:&quot;647f36a8454af0237bd49574&quot;,&quot;creatorId&quot;:&quot;647f36a8454af0237bd49574&quot;},&quot;revision&quot;:&quot;main&quot;,&quot;filePath&quot;:&quot;app.py&quot;,&quot;openByDefault&quot;:false}"><div class="sm:relative mr-2"><button class="flex h-[1.125rem] select-none items-center gap-0.5 rounded border pl-0.5 pr-0.5 text-xs leading-tight text-gray-400 hover:cursor-pointer text-gray-400 hover:border-gray-200 hover:bg-gray-50 hover:text-gray-500 dark:border-gray-800 dark:hover:bg-gray-800 dark:hover:text-gray-200 "><svg class="flex-none" width="1em" height="1em" viewBox="0 0 22 28" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M15.3634 10.3639C15.8486 10.8491 15.8486 11.6357 15.3634 12.1209L10.9292 16.5551C10.6058 16.8785 10.0814 16.8785 9.7579 16.5551L7.03051 13.8277C6.54532 13.3425 6.54532 12.5558 7.03051 12.0707C7.51569 11.5855 8.30234 11.5855 8.78752 12.0707L9.7579 13.041C10.0814 13.3645 10.6058 13.3645 10.9292 13.041L13.6064 10.3639C14.0916 9.8787 14.8782 9.8787 15.3634 10.3639Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M10.6666 27.12C4.93329 25.28 0 19.2267 0 12.7867V6.52001C0 5.40001 0.693334 4.41334 1.73333 4.01334L9.73333 1.01334C10.3333 0.786673 11 0.786673 11.6 1.02667L19.6 4.02667C20.1083 4.21658 20.5465 4.55701 20.8562 5.00252C21.1659 5.44803 21.3324 5.97742 21.3333 6.52001V12.7867C21.3333 19.24 16.4 25.28 10.6666 27.12Z" fill="currentColor" fill-opacity="0.22"></path><path d="M10.0845 1.94967L10.0867 1.94881C10.4587 1.8083 10.8666 1.81036 11.2286 1.95515L11.2387 1.95919L11.2489 1.963L19.2489 4.963L19.25 4.96342C19.5677 5.08211 19.8416 5.29488 20.0351 5.57333C20.2285 5.85151 20.3326 6.18203 20.3333 6.52082C20.3333 6.52113 20.3333 6.52144 20.3333 6.52176L20.3333 12.7867C20.3333 18.6535 15.8922 24.2319 10.6666 26.0652C5.44153 24.2316 1 18.6409 1 12.7867V6.52001C1 5.82357 1.42893 5.20343 2.08883 4.94803L10.0845 1.94967Z" stroke="currentColor" stroke-opacity="0.30" stroke-width="2"></path></svg>
<span class="mr-0.5 max-sm:hidden">Safe</span></button>
</div></div>
</div>
<div class="flex items-center gap-x-3 dark:text-gray-300 sm:ml-auto"><div class="SVELTE_HYDRATER contents" data-target="LineWrapButton" data-props="{&quot;classNames&quot;:&quot;text-xs&quot;,&quot;lineSelectorClass&quot;:&quot;blob-line&quot;}">
<button class="text-xs" type="button" title="Toggle Line Wrap"><svg class="opacity-50" width="1em" height="1em" viewBox="0 0 12 11" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0.75 1.25H11.25M0.75 5H9C9.75 5 11.25 5.375 11.25 6.875C11.25 8.375 9.99975 8.75 9.375 8.75H6M6 8.75L7.5 7.25M6 8.75L7.5 10.25M0.75 8.75H3.75" stroke="currentColor" stroke-width="1.125" stroke-linecap="round" stroke-linejoin="round"></path></svg></button></div>
7.4 kB</div></div>
<div class="relative min-h-[100px] rounded-b-lg border border-t-0 leading-tight dark:border-gray-800 dark:bg-gray-925">
<div class="py-3"><div class="SVELTE_HYDRATER contents" data-target="BlobContent" data-props="{&quot;lines&quot;:[&quot;<span class=\&quot;hljs-comment\&quot;># -*- coding: utf-8 -*-</span>&quot;,&quot;<span class=\&quot;hljs-string\&quot;>&amp;quot;&amp;quot;&amp;quot;Now that we&amp;#x27;ve built a powerful LLM-based classifier, let&amp;#x27;s showcase it to the world by creating an interactive demo. In this chapter, we&amp;#x27;ll learn how to:</span>&quot;,&quot;<span class=\&quot;hljs-string\&quot;>- Create a user-friendly web interface using Gradio</span>&quot;,&quot;<span class=\&quot;hljs-string\&quot;>- Package our demo for deployment</span>&quot;,&quot;<span class=\&quot;hljs-string\&quot;>- Deploy it on Hugging Face Spaces for free</span>&quot;,&quot;<span class=\&quot;hljs-string\&quot;>- Use the Hugging Face Inference API for model access</span>&quot;,&quot;<span class=\&quot;hljs-string\&quot;>&amp;quot;&amp;quot;&amp;quot;</span>&quot;,&quot;&quot;,&quot;<span class=\&quot;hljs-keyword\&quot;>import</span> json&quot;,&quot;<span class=\&quot;hljs-keyword\&quot;>import</span> time&quot;,&quot;<span class=\&quot;hljs-keyword\&quot;>import</span> os&quot;,&quot;<span class=\&quot;hljs-keyword\&quot;>import</span> sys&quot;,&quot;<span class=\&quot;hljs-keyword\&quot;>from</span> retry <span class=\&quot;hljs-keyword\&quot;>import</span> retry&quot;,&quot;<span class=\&quot;hljs-keyword\&quot;>from</span> rich.progress <span class=\&quot;hljs-keyword\&quot;>import</span> track&quot;,&quot;<span class=\&quot;hljs-keyword\&quot;>from</span> huggingface_hub <span class=\&quot;hljs-keyword\&quot;>import</span> InferenceClient&quot;,&quot;<span class=\&quot;hljs-keyword\&quot;>from</span> sklearn.model_selection <span class=\&quot;hljs-keyword\&quot;>import</span> train_test_split&quot;,&quot;<span class=\&quot;hljs-keyword\&quot;>from</span> sklearn.metrics <span class=\&quot;hljs-keyword\&quot;>import</span> confusion_matrix, classification_report&quot;,&quot;<span class=\&quot;hljs-keyword\&quot;>import</span> pandas <span class=\&quot;hljs-keyword\&quot;>as</span> pd&quot;,&quot;<span class=\&quot;hljs-keyword\&quot;>import</span> gradio <span class=\&quot;hljs-keyword\&quot;>as</span> gr&quot;,&quot;&quot;,&quot;<span class=\&quot;hljs-comment\&quot;># Calling HF client</span>&quot;,&quot;api_key = os.getenv(<span class=\&quot;hljs-string\&quot;>&amp;quot;HF_TOKEN&amp;quot;</span>)&quot;,&quot;client = InferenceClient(token=api_key)&quot;,&quot;&quot;,&quot;<span class=\&quot;hljs-comment\&quot;># Load sample data</span>&quot;,&quot;sample_df = pd.read_csv(<span class=\&quot;hljs-string\&quot;>&amp;quot;sample.csv&amp;quot;</span>)&quot;,&quot;&quot;,&quot;<span class=\&quot;hljs-keyword\&quot;>def</span> <span class=\&quot;hljs-title function_\&quot;>get_batch_list</span>(<span class=\&quot;hljs-params\&quot;>li, n=<span class=\&quot;hljs-number\&quot;>10</span></span>):&quot;,&quot; <span class=\&quot;hljs-string\&quot;>&amp;quot;&amp;quot;&amp;quot;Split the provided list into batches of size `n`.&amp;quot;&amp;quot;&amp;quot;</span>&quot;,&quot; batch_list = []&quot;,&quot; <span class=\&quot;hljs-keyword\&quot;>for</span> i <span class=\&quot;hljs-keyword\&quot;>in</span> <span class=\&quot;hljs-built_in\&quot;>range</span>(<span class=\&quot;hljs-number\&quot;>0</span>, <span class=\&quot;hljs-built_in\&quot;>len</span>(li), n):&quot;,&quot; batch_list.append(li[i : i + n])&quot;,&quot; <span class=\&quot;hljs-keyword\&quot;>return</span> batch_list&quot;,&quot;&quot;,&quot;<span class=\&quot;hljs-comment\&quot;># Helper function to split data into batches</span>&quot;,&quot;training_input, test_input, training_output, test_output = train_test_split(&quot;,&quot; sample_df[[<span class=\&quot;hljs-string\&quot;>&amp;#x27;payee&amp;#x27;</span>]],&quot;,&quot; sample_df[<span class=\&quot;hljs-string\&quot;>&amp;#x27;category&amp;#x27;</span>],&quot;,&quot; test_size=<span class=\&quot;hljs-number\&quot;>0.33</span>,&quot;,&quot; random_state=<span class=\&quot;hljs-number\&quot;>42</span>&quot;,&quot;)&quot;,&quot;&quot;,&quot;<span class=\&quot;hljs-comment\&quot;># Function to create few-shot examples</span>&quot;,&quot;<span class=\&quot;hljs-keyword\&quot;>def</span> <span class=\&quot;hljs-title function_\&quot;>get_fewshots</span>(<span class=\&quot;hljs-params\&quot;>training_input, training_output, batch_size=<span class=\&quot;hljs-number\&quot;>10</span></span>):&quot;,&quot; <span class=\&quot;hljs-string\&quot;>&amp;quot;&amp;quot;&amp;quot;Convert the training input and output from sklearn&amp;#x27;s train_test_split into a few-shot prompt&amp;quot;&amp;quot;&amp;quot;</span>&quot;,&quot; <span class=\&quot;hljs-comment\&quot;># Batch up the training input into groups of `batch_size`</span>&quot;,&quot; input_batches = get_batch_list(<span class=\&quot;hljs-built_in\&quot;>list</span>(training_input.payee), n=batch_size)&quot;,&quot;&quot;,&quot; <span class=\&quot;hljs-comment\&quot;># Do the same for the output</span>&quot;,&quot; output_batches = get_batch_list(<span class=\&quot;hljs-built_in\&quot;>list</span>(training_output), n=batch_size)&quot;,&quot;&quot;,&quot; <span class=\&quot;hljs-comment\&quot;># Create a list to hold the formatted few-shot examples</span>&quot;,&quot; fewshot_list = []&quot;,&quot;&quot;,&quot; <span class=\&quot;hljs-comment\&quot;># Ensure we only process complete pairs</span>&quot;,&quot; batch_count = <span class=\&quot;hljs-built_in\&quot;>min</span>(<span class=\&quot;hljs-built_in\&quot;>len</span>(input_batches), <span class=\&quot;hljs-built_in\&quot;>len</span>(output_batches))&quot;,&quot;&quot;,&quot; <span class=\&quot;hljs-comment\&quot;># Loop through the batches</span>&quot;,&quot; <span class=\&quot;hljs-keyword\&quot;>for</span> i <span class=\&quot;hljs-keyword\&quot;>in</span> <span class=\&quot;hljs-built_in\&quot;>range</span>(batch_count):&quot;,&quot; fewshot_list.extend([&quot;,&quot; <span class=\&quot;hljs-comment\&quot;># Create a &amp;quot;user&amp;quot; message for the LLM formatted the same as our prompt with newlines</span>&quot;,&quot; {&quot;,&quot; <span class=\&quot;hljs-string\&quot;>&amp;quot;role&amp;quot;</span>: <span class=\&quot;hljs-string\&quot;>&amp;quot;user&amp;quot;</span>,&quot;,&quot; <span class=\&quot;hljs-string\&quot;>&amp;quot;content&amp;quot;</span>: <span class=\&quot;hljs-string\&quot;>&amp;quot;\\n&amp;quot;</span>.join(input_batches[i]),&quot;,&quot; },&quot;,&quot; <span class=\&quot;hljs-comment\&quot;># Create the expected &amp;quot;assistant&amp;quot; response as the JSON formatted output we expect</span>&quot;,&quot; {&quot;,&quot; <span class=\&quot;hljs-string\&quot;>&amp;quot;role&amp;quot;</span>: <span class=\&quot;hljs-string\&quot;>&amp;quot;assistant&amp;quot;</span>,&quot;,&quot; <span class=\&quot;hljs-string\&quot;>&amp;quot;content&amp;quot;</span>: json.dumps(output_batches[i])&quot;,&quot; }&quot;,&quot; ])&quot;,&quot;&quot;,&quot; <span class=\&quot;hljs-comment\&quot;># Return the list of few-shot examples, one for each batch</span>&quot;,&quot; <span class=\&quot;hljs-keyword\&quot;>return</span> fewshot_list&quot;,&quot;&quot;,&quot;fewshot_list = get_fewshots(training_input, training_output)&quot;,&quot;&quot;,&quot;<span class=\&quot;hljs-meta\&quot;>@retry(<span class=\&quot;hljs-params\&quot;>ValueError, tries=<span class=\&quot;hljs-number\&quot;>2</span>, delay=<span class=\&quot;hljs-number\&quot;>2</span></span>)</span>&quot;,&quot;<span class=\&quot;hljs-keyword\&quot;>def</span> <span class=\&quot;hljs-title function_\&quot;>classify_payees</span>(<span class=\&quot;hljs-params\&quot;>name_list</span>):&quot;,&quot; prompt = <span class=\&quot;hljs-string\&quot;>&amp;quot;&amp;quot;&amp;quot;You are an AI model trained to categorize businesses based on their names.</span>&quot;,&quot;<span class=\&quot;hljs-string\&quot;></span>&quot;,&quot;<span class=\&quot;hljs-string\&quot;>You will be given a list of business names, each separated by a new line.</span>&quot;,&quot;<span class=\&quot;hljs-string\&quot;></span>&quot;,&quot;<span class=\&quot;hljs-string\&quot;>Your task is to analyze each name and classify it into one of the following categories: Restaurant, Bar, Hotel, or Other.</span>&quot;,&quot;<span class=\&quot;hljs-string\&quot;></span>&quot;,&quot;<span class=\&quot;hljs-string\&quot;>It is extremely critical that there is a corresponding category output for each business name provided as an input.</span>&quot;,&quot;<span class=\&quot;hljs-string\&quot;></span>&quot;,&quot;<span class=\&quot;hljs-string\&quot;>If a business does not clearly fall into Restaurant, Bar, or Hotel categories, you should classify it as &amp;quot;Other&amp;quot;.</span>&quot;,&quot;<span class=\&quot;hljs-string\&quot;></span>&quot;,&quot;<span class=\&quot;hljs-string\&quot;>Even if the type of business is not immediately clear from the name, it is essential that you provide your best guess based on the information available to you. If you can&amp;#x27;t make a good guess, classify it as Other.</span>&quot;,&quot;<span class=\&quot;hljs-string\&quot;></span>&quot;,&quot;<span class=\&quot;hljs-string\&quot;>For example, if given the following input:</span>&quot;,&quot;<span class=\&quot;hljs-string\&quot;></span>&quot;,&quot;<span class=\&quot;hljs-string\&quot;>&amp;quot;Intercontinental Hotel\\nPizza Hut\\nCheers\\nWelsh&amp;#x27;s Family Restaurant\\nKTLA\\nDirect Mailing&amp;quot;</span>&quot;,&quot;<span class=\&quot;hljs-string\&quot;></span>&quot;,&quot;<span class=\&quot;hljs-string\&quot;>Your output should be a JSON list in the following format:</span>&quot;,&quot;<span class=\&quot;hljs-string\&quot;></span>&quot;,&quot;<span class=\&quot;hljs-string\&quot;>[&amp;quot;Hotel&amp;quot;, &amp;quot;Restaurant&amp;quot;, &amp;quot;Bar&amp;quot;, &amp;quot;Restaurant&amp;quot;, &amp;quot;Other&amp;quot;, &amp;quot;Other&amp;quot;]</span>&quot;,&quot;<span class=\&quot;hljs-string\&quot;></span>&quot;,&quot;<span class=\&quot;hljs-string\&quot;>This means that you have classified &amp;quot;Intercontinental Hotel&amp;quot; as a Hotel, &amp;quot;Pizza Hut&amp;quot; as a Restaurant, &amp;quot;Cheers&amp;quot; as a Bar, &amp;quot;Welsh&amp;#x27;s Family Restaurant&amp;quot; as a Restaurant, and both &amp;quot;KTLA&amp;quot; and &amp;quot;Direct Mailing&amp;quot; as Other.</span>&quot;,&quot;<span class=\&quot;hljs-string\&quot;></span>&quot;,&quot;<span class=\&quot;hljs-string\&quot;>If a business name contains both the word &amp;quot;Restaurant&amp;quot; and the word &amp;quot;Bar&amp;quot;, you should classify it as a Restaurant.</span>&quot;,&quot;<span class=\&quot;hljs-string\&quot;></span>&quot;,&quot;<span class=\&quot;hljs-string\&quot;>Ensure that the number of classifications in your output matches the number of business names in the input. It is very important that the length of the JSON list you return is exactly the same as the number of business names you receive.</span>&quot;,&quot;<span class=\&quot;hljs-string\&quot;>&amp;quot;&amp;quot;&amp;quot;</span>&quot;,&quot; <span class=\&quot;hljs-keyword\&quot;>try</span>:&quot;,&quot; response = client.chat.completions.create(&quot;,&quot; messages=[&quot;,&quot; <span class=\&quot;hljs-comment\&quot;># System role message that explains the classification task</span>&quot;,&quot; {&quot;,&quot; <span class=\&quot;hljs-string\&quot;>&amp;quot;role&amp;quot;</span>: <span class=\&quot;hljs-string\&quot;>&amp;quot;system&amp;quot;</span>,&quot;,&quot; <span class=\&quot;hljs-string\&quot;>&amp;quot;content&amp;quot;</span>: prompt,&quot;,&quot; },&quot;,&quot; *fewshot_list,&quot;,&quot; {&quot;,&quot; <span class=\&quot;hljs-string\&quot;>&amp;quot;role&amp;quot;</span>: <span class=\&quot;hljs-string\&quot;>&amp;quot;user&amp;quot;</span>,&quot;,&quot; <span class=\&quot;hljs-string\&quot;>&amp;quot;content&amp;quot;</span>: <span class=\&quot;hljs-string\&quot;>&amp;quot;\\n&amp;quot;</span>.join(name_list),&quot;,&quot; }&quot;,&quot; ],&quot;,&quot; model=<span class=\&quot;hljs-string\&quot;>&amp;quot;meta-llama/Llama-3.3-70B-Instruct&amp;quot;</span>,&quot;,&quot; temperature=<span class=\&quot;hljs-number\&quot;>0</span>,&quot;,&quot; )&quot;,&quot;&quot;,&quot; answer_str = response.choices[<span class=\&quot;hljs-number\&quot;>0</span>].message.content&quot;,&quot; answer_list = json.loads(answer_str)&quot;,&quot;&quot;,&quot; acceptable_answers = [&quot;,&quot; <span class=\&quot;hljs-string\&quot;>&amp;quot;Restaurant&amp;quot;</span>,&quot;,&quot; <span class=\&quot;hljs-string\&quot;>&amp;quot;Bar&amp;quot;</span>,&quot;,&quot; <span class=\&quot;hljs-string\&quot;>&amp;quot;Hotel&amp;quot;</span>,&quot;,&quot; <span class=\&quot;hljs-string\&quot;>&amp;quot;Other&amp;quot;</span>,&quot;,&quot; ]&quot;,&quot; <span class=\&quot;hljs-keyword\&quot;>for</span> answer <span class=\&quot;hljs-keyword\&quot;>in</span> answer_list:&quot;,&quot; <span class=\&quot;hljs-keyword\&quot;>if</span> answer <span class=\&quot;hljs-keyword\&quot;>not</span> <span class=\&quot;hljs-keyword\&quot;>in</span> acceptable_answers:&quot;,&quot; <span class=\&quot;hljs-keyword\&quot;>raise</span> ValueError(<span class=\&quot;hljs-string\&quot;>f&amp;quot;<span class=\&quot;hljs-subst\&quot;>{answer}</span> not in list of acceptable answers&amp;quot;</span>)&quot;,&quot;&quot;,&quot; <span class=\&quot;hljs-keyword\&quot;>if</span> <span class=\&quot;hljs-built_in\&quot;>len</span>(name_list) != <span class=\&quot;hljs-built_in\&quot;>len</span>(answer_list):&quot;,&quot; <span class=\&quot;hljs-keyword\&quot;>raise</span> ValueError(<span class=\&quot;hljs-string\&quot;>f&amp;quot;Number of inputs (<span class=\&quot;hljs-subst\&quot;>{<span class=\&quot;hljs-built_in\&quot;>len</span>(name_list)}</span>) does not equal the number of outputs (<span class=\&quot;hljs-subst\&quot;>{<span class=\&quot;hljs-built_in\&quot;>len</span>(answer_list)}</span>)&amp;quot;</span>)&quot;,&quot;&quot;,&quot; <span class=\&quot;hljs-keyword\&quot;>return</span> <span class=\&quot;hljs-built_in\&quot;>dict</span>(<span class=\&quot;hljs-built_in\&quot;>zip</span>(name_list, answer_list))&quot;,&quot; &quot;,&quot; <span class=\&quot;hljs-keyword\&quot;>except</span> Exception <span class=\&quot;hljs-keyword\&quot;>as</span> e:&quot;,&quot; <span class=\&quot;hljs-comment\&quot;># Reraise as ValueError to trigger retry</span>&quot;,&quot; <span class=\&quot;hljs-keyword\&quot;>raise</span> ValueError(<span class=\&quot;hljs-string\&quot;>f&amp;quot;Error during classification: <span class=\&quot;hljs-subst\&quot;>{<span class=\&quot;hljs-built_in\&quot;>str</span>(e)}</span>&amp;quot;</span>)&quot;,&quot;&quot;,&quot;<span class=\&quot;hljs-keyword\&quot;>def</span> <span class=\&quot;hljs-title function_\&quot;>classify_batches</span>(<span class=\&quot;hljs-params\&quot;>name_list, batch_size=<span class=\&quot;hljs-number\&quot;>10</span>, wait=<span class=\&quot;hljs-number\&quot;>2</span></span>):&quot;,&quot; <span class=\&quot;hljs-comment\&quot;># Store the results</span>&quot;,&quot; all_results = {}&quot;,&quot;&quot;,&quot; <span class=\&quot;hljs-comment\&quot;># Batch up the list</span>&quot;,&quot; batch_list = get_batch_list(name_list, n=batch_size)&quot;,&quot;&quot;,&quot; <span class=\&quot;hljs-comment\&quot;># Loop through the list in batches</span>&quot;,&quot; <span class=\&quot;hljs-keyword\&quot;>for</span> batch <span class=\&quot;hljs-keyword\&quot;>in</span> track(batch_list):&quot;,&quot; <span class=\&quot;hljs-keyword\&quot;>try</span>:&quot;,&quot; <span class=\&quot;hljs-comment\&quot;># Classify it</span>&quot;,&quot; batch_results = classify_payees(batch)&quot;,&quot;&quot;,&quot; <span class=\&quot;hljs-comment\&quot;># Add it to the results</span>&quot;,&quot; all_results.update(batch_results)&quot;,&quot;&quot;,&quot; <span class=\&quot;hljs-comment\&quot;># Tap the brakes</span>&quot;,&quot; time.sleep(wait)&quot;,&quot; <span class=\&quot;hljs-keyword\&quot;>except</span> Exception <span class=\&quot;hljs-keyword\&quot;>as</span> e:&quot;,&quot; <span class=\&quot;hljs-built_in\&quot;>print</span>(<span class=\&quot;hljs-string\&quot;>f&amp;quot;Error processing batch: <span class=\&quot;hljs-subst\&quot;>{e}</span>&amp;quot;</span>, file=sys.stderr)&quot;,&quot; <span class=\&quot;hljs-comment\&quot;># Continue with other batches</span>&quot;,&quot;&quot;,&quot; <span class=\&quot;hljs-comment\&quot;># Return the results</span>&quot;,&quot; <span class=\&quot;hljs-keyword\&quot;>return</span> pd.DataFrame(&quot;,&quot; all_results.items(),&quot;,&quot; columns=[<span class=\&quot;hljs-string\&quot;>&amp;quot;payee&amp;quot;</span>, <span class=\&quot;hljs-string\&quot;>&amp;quot;category&amp;quot;</span>]&quot;,&quot; )&quot;,&quot;&quot;,&quot;<span class=\&quot;hljs-comment\&quot;># Run classification on test data</span>&quot;,&quot;llm_df = classify_batches(<span class=\&quot;hljs-built_in\&quot;>list</span>(test_input.payee))&quot;,&quot;&quot;,&quot;<span class=\&quot;hljs-comment\&quot;># -- Gradio interface function --</span>&quot;,&quot;<span class=\&quot;hljs-keyword\&quot;>def</span> <span class=\&quot;hljs-title function_\&quot;>classify_business_names</span>(<span class=\&quot;hljs-params\&quot;>input_text</span>):&quot;,&quot; <span class=\&quot;hljs-comment\&quot;># Parse input text into list of names</span>&quot;,&quot; name_list = [line.strip() <span class=\&quot;hljs-keyword\&quot;>for</span> line <span class=\&quot;hljs-keyword\&quot;>in</span> input_text.splitlines() <span class=\&quot;hljs-keyword\&quot;>if</span> line.strip()]&quot;,&quot; &quot;,&quot; <span class=\&quot;hljs-keyword\&quot;>if</span> <span class=\&quot;hljs-keyword\&quot;>not</span> name_list:&quot;,&quot; <span class=\&quot;hljs-keyword\&quot;>return</span> json.dumps({<span class=\&quot;hljs-string\&quot;>&amp;quot;error&amp;quot;</span>: <span class=\&quot;hljs-string\&quot;>&amp;quot;No business names provided. Please enter at least one business name.&amp;quot;</span>})&quot;,&quot; &quot;,&quot; <span class=\&quot;hljs-keyword\&quot;>try</span>:&quot;,&quot; result = classify_payees(name_list)&quot;,&quot; <span class=\&quot;hljs-keyword\&quot;>return</span> json.dumps(result, indent=<span class=\&quot;hljs-number\&quot;>2</span>)&quot;,&quot; <span class=\&quot;hljs-keyword\&quot;>except</span> Exception <span class=\&quot;hljs-keyword\&quot;>as</span> e:&quot;,&quot; <span class=\&quot;hljs-keyword\&quot;>return</span> json.dumps({<span class=\&quot;hljs-string\&quot;>&amp;quot;error&amp;quot;</span>: <span class=\&quot;hljs-string\&quot;>f&amp;quot;Classification failed: <span class=\&quot;hljs-subst\&quot;>{<span class=\&quot;hljs-built_in\&quot;>str</span>(e)}</span>&amp;quot;</span>})&quot;,&quot;&quot;,&quot;<span class=\&quot;hljs-comment\&quot;># -- Launch the demo --</span>&quot;,&quot;demo = gr.Interface(&quot;,&quot; fn=classify_business_names,&quot;,&quot; inputs=gr.Textbox(lines=<span class=\&quot;hljs-number\&quot;>10</span>, placeholder=<span class=\&quot;hljs-string\&quot;>&amp;quot;Enter business names, one per line&amp;quot;</span>),&quot;,&quot; outputs=gr.JSON(),&quot;,&quot; title=<span class=\&quot;hljs-string\&quot;>&amp;quot;Business Category Classifier&amp;quot;</span>,&quot;,&quot; description=<span class=\&quot;hljs-string\&quot;>&amp;quot;Enter business names and get a classification: Restaurant, Bar, Hotel, or Other.&amp;quot;</span>,&quot;,&quot; examples=[&quot;,&quot; [<span class=\&quot;hljs-string\&quot;>&amp;quot;Marriott Hotel\\nTaco Bell\\nThe Tipsy Cow\\nStarbucks\\nApple Store&amp;quot;</span>]&quot;,&quot; ]&quot;,&quot;)&quot;,&quot;&quot;,&quot;<span class=\&quot;hljs-keyword\&quot;>if</span> __name__ == <span class=\&quot;hljs-string\&quot;>&amp;quot;__main__&amp;quot;</span>:&quot;,&quot; demo.launch(share=<span class=\&quot;hljs-literal\&quot;>True</span>)&quot;],&quot;lineSelectorClass&quot;:&quot;blob-line&quot;,&quot;context&quot;:{&quot;repo&quot;:{&quot;name&quot;:&quot;fdaudens/test-app&quot;,&quot;type&quot;:&quot;space&quot;},&quot;revision&quot;:&quot;863ba7428fb6bea75c3307d20c7137e1ba531a15&quot;,&quot;path&quot;:&quot;app.py&quot;}}">
<div class="relative text-sm"><div class="overflow-x-auto"><table class="min-w-full border-collapse font-mono"><tbody><tr class="" id="L1">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="1"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-comment"># -*- coding: utf-8 -*-</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L2">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="2"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-string">&quot;&quot;&quot;Now that we&#x27;ve built a powerful LLM-based classifier, let&#x27;s showcase it to the world by creating an interactive demo. In this chapter, we&#x27;ll learn how to:</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L3">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="3"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-string">- Create a user-friendly web interface using Gradio</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L4">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="4"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-string">- Package our demo for deployment</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L5">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="5"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-string">- Deploy it on Hugging Face Spaces for free</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L6">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="6"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-string">- Use the Hugging Face Inference API for model access</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L7">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="7"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-string">&quot;&quot;&quot;</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L8">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="8"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START -->
<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L9">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="9"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-keyword">import</span> json<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L10">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="10"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-keyword">import</span> time<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L11">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="11"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-keyword">import</span> os<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L12">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="12"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-keyword">import</span> sys<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L13">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="13"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-keyword">from</span> retry <span class="hljs-keyword">import</span> retry<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L14">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="14"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-keyword">from</span> rich.progress <span class="hljs-keyword">import</span> track<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L15">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="15"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> InferenceClient<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L16">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="16"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-keyword">from</span> sklearn.model_selection <span class="hljs-keyword">import</span> train_test_split<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L17">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="17"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-keyword">from</span> sklearn.metrics <span class="hljs-keyword">import</span> confusion_matrix, classification_report<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L18">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="18"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-keyword">import</span> pandas <span class="hljs-keyword">as</span> pd<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L19">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="19"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-keyword">import</span> gradio <span class="hljs-keyword">as</span> gr<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L20">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="20"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START -->
<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L21">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="21"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-comment"># Calling HF client</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L22">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="22"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START -->api_key = os.getenv(<span class="hljs-string">&quot;HF_TOKEN&quot;</span>)<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L23">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="23"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START -->client = InferenceClient(token=api_key)<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L24">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="24"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START -->
<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L25">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="25"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-comment"># Load sample data</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L26">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="26"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START -->sample_df = pd.read_csv(<span class="hljs-string">&quot;sample.csv&quot;</span>)<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L27">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="27"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START -->
<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L28">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="28"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-keyword">def</span> <span class="hljs-title function_">get_batch_list</span>(<span class="hljs-params">li, n=<span class="hljs-number">10</span></span>):<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L29">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="29"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-string">&quot;&quot;&quot;Split the provided list into batches of size `n`.&quot;&quot;&quot;</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L30">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="30"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> batch_list = []<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L31">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="31"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> <span class="hljs-built_in">range</span>(<span class="hljs-number">0</span>, <span class="hljs-built_in">len</span>(li), n):<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L32">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="32"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> batch_list.append(li[i : i + n])<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L33">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="33"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-keyword">return</span> batch_list<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L34">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="34"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START -->
<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L35">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="35"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-comment"># Helper function to split data into batches</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L36">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="36"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START -->training_input, test_input, training_output, test_output = train_test_split(<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L37">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="37"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> sample_df[[<span class="hljs-string">&#x27;payee&#x27;</span>]],<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L38">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="38"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> sample_df[<span class="hljs-string">&#x27;category&#x27;</span>],<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L39">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="39"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> test_size=<span class="hljs-number">0.33</span>,<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L40">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="40"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> random_state=<span class="hljs-number">42</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L41">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="41"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START -->)<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L42">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="42"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START -->
<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L43">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="43"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-comment"># Function to create few-shot examples</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L44">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="44"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-keyword">def</span> <span class="hljs-title function_">get_fewshots</span>(<span class="hljs-params">training_input, training_output, batch_size=<span class="hljs-number">10</span></span>):<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L45">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="45"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-string">&quot;&quot;&quot;Convert the training input and output from sklearn&#x27;s train_test_split into a few-shot prompt&quot;&quot;&quot;</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L46">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="46"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-comment"># Batch up the training input into groups of `batch_size`</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L47">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="47"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> input_batches = get_batch_list(<span class="hljs-built_in">list</span>(training_input.payee), n=batch_size)<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L48">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="48"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START -->
<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L49">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="49"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-comment"># Do the same for the output</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L50">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="50"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> output_batches = get_batch_list(<span class="hljs-built_in">list</span>(training_output), n=batch_size)<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L51">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="51"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START -->
<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L52">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="52"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-comment"># Create a list to hold the formatted few-shot examples</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L53">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="53"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> fewshot_list = []<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L54">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="54"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START -->
<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L55">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="55"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-comment"># Ensure we only process complete pairs</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L56">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="56"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> batch_count = <span class="hljs-built_in">min</span>(<span class="hljs-built_in">len</span>(input_batches), <span class="hljs-built_in">len</span>(output_batches))<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L57">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="57"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START -->
<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L58">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="58"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-comment"># Loop through the batches</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L59">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="59"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> <span class="hljs-built_in">range</span>(batch_count):<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L60">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="60"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> fewshot_list.extend([<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L61">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="61"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-comment"># Create a &quot;user&quot; message for the LLM formatted the same as our prompt with newlines</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L62">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="62"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> {<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L63">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="63"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;user&quot;</span>,<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L64">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="64"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;\n&quot;</span>.join(input_batches[i]),<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L65">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="65"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> },<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L66">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="66"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-comment"># Create the expected &quot;assistant&quot; response as the JSON formatted output we expect</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L67">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="67"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> {<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L68">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="68"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;assistant&quot;</span>,<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L69">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="69"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-string">&quot;content&quot;</span>: json.dumps(output_batches[i])<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L70">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="70"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> }<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L71">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="71"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> ])<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L72">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="72"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START -->
<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L73">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="73"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-comment"># Return the list of few-shot examples, one for each batch</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L74">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="74"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-keyword">return</span> fewshot_list<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L75">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="75"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START -->
<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L76">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="76"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START -->fewshot_list = get_fewshots(training_input, training_output)<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L77">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="77"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START -->
<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L78">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="78"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-meta">@retry(<span class="hljs-params">ValueError, tries=<span class="hljs-number">2</span>, delay=<span class="hljs-number">2</span></span>)</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L79">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="79"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-keyword">def</span> <span class="hljs-title function_">classify_payees</span>(<span class="hljs-params">name_list</span>):<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L80">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="80"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> prompt = <span class="hljs-string">&quot;&quot;&quot;You are an AI model trained to categorize businesses based on their names.</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L81">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="81"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-string"></span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L82">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="82"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-string">You will be given a list of business names, each separated by a new line.</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L83">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="83"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-string"></span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L84">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="84"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-string">Your task is to analyze each name and classify it into one of the following categories: Restaurant, Bar, Hotel, or Other.</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L85">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="85"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-string"></span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L86">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="86"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-string">It is extremely critical that there is a corresponding category output for each business name provided as an input.</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L87">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="87"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-string"></span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L88">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="88"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-string">If a business does not clearly fall into Restaurant, Bar, or Hotel categories, you should classify it as &quot;Other&quot;.</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L89">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="89"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-string"></span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L90">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="90"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-string">Even if the type of business is not immediately clear from the name, it is essential that you provide your best guess based on the information available to you. If you can&#x27;t make a good guess, classify it as Other.</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L91">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="91"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-string"></span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L92">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="92"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-string">For example, if given the following input:</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L93">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="93"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-string"></span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L94">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="94"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-string">&quot;Intercontinental Hotel\nPizza Hut\nCheers\nWelsh&#x27;s Family Restaurant\nKTLA\nDirect Mailing&quot;</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L95">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="95"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-string"></span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L96">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="96"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-string">Your output should be a JSON list in the following format:</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L97">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="97"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-string"></span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L98">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="98"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-string">[&quot;Hotel&quot;, &quot;Restaurant&quot;, &quot;Bar&quot;, &quot;Restaurant&quot;, &quot;Other&quot;, &quot;Other&quot;]</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L99">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="99"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-string"></span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L100">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="100"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-string">This means that you have classified &quot;Intercontinental Hotel&quot; as a Hotel, &quot;Pizza Hut&quot; as a Restaurant, &quot;Cheers&quot; as a Bar, &quot;Welsh&#x27;s Family Restaurant&quot; as a Restaurant, and both &quot;KTLA&quot; and &quot;Direct Mailing&quot; as Other.</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L101">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="101"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-string"></span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L102">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="102"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-string">If a business name contains both the word &quot;Restaurant&quot; and the word &quot;Bar&quot;, you should classify it as a Restaurant.</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L103">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="103"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-string"></span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L104">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="104"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-string">Ensure that the number of classifications in your output matches the number of business names in the input. It is very important that the length of the JSON list you return is exactly the same as the number of business names you receive.</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L105">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="105"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-string">&quot;&quot;&quot;</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L106">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="106"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-keyword">try</span>:<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L107">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="107"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> response = client.chat.completions.create(<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L108">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="108"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> messages=[<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L109">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="109"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-comment"># System role message that explains the classification task</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L110">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="110"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> {<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L111">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="111"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;system&quot;</span>,<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L112">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="112"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-string">&quot;content&quot;</span>: prompt,<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L113">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="113"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> },<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L114">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="114"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> *fewshot_list,<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L115">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="115"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> {<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L116">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="116"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;user&quot;</span>,<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L117">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="117"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;\n&quot;</span>.join(name_list),<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L118">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="118"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> }<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L119">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="119"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> ],<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L120">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="120"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> model=<span class="hljs-string">&quot;meta-llama/Llama-3.3-70B-Instruct&quot;</span>,<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L121">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="121"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> temperature=<span class="hljs-number">0</span>,<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L122">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="122"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> )<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L123">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="123"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START -->
<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L124">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="124"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> answer_str = response.choices[<span class="hljs-number">0</span>].message.content<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L125">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="125"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> answer_list = json.loads(answer_str)<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L126">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="126"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START -->
<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L127">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="127"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> acceptable_answers = [<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L128">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="128"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-string">&quot;Restaurant&quot;</span>,<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L129">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="129"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-string">&quot;Bar&quot;</span>,<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L130">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="130"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-string">&quot;Hotel&quot;</span>,<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L131">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="131"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-string">&quot;Other&quot;</span>,<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L132">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="132"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> ]<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L133">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="133"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-keyword">for</span> answer <span class="hljs-keyword">in</span> answer_list:<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L134">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="134"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-keyword">if</span> answer <span class="hljs-keyword">not</span> <span class="hljs-keyword">in</span> acceptable_answers:<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L135">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="135"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-keyword">raise</span> ValueError(<span class="hljs-string">f&quot;<span class="hljs-subst">{answer}</span> not in list of acceptable answers&quot;</span>)<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L136">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="136"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START -->
<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L137">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="137"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-keyword">if</span> <span class="hljs-built_in">len</span>(name_list) != <span class="hljs-built_in">len</span>(answer_list):<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L138">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="138"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-keyword">raise</span> ValueError(<span class="hljs-string">f&quot;Number of inputs (<span class="hljs-subst">{<span class="hljs-built_in">len</span>(name_list)}</span>) does not equal the number of outputs (<span class="hljs-subst">{<span class="hljs-built_in">len</span>(answer_list)}</span>)&quot;</span>)<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L139">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="139"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START -->
<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L140">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="140"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-keyword">return</span> <span class="hljs-built_in">dict</span>(<span class="hljs-built_in">zip</span>(name_list, answer_list))<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L141">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="141"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <!-- HTML_TAG_END --></td>
</tr><tr class="" id="L142">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="142"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-keyword">except</span> Exception <span class="hljs-keyword">as</span> e:<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L143">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="143"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-comment"># Reraise as ValueError to trigger retry</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L144">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="144"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-keyword">raise</span> ValueError(<span class="hljs-string">f&quot;Error during classification: <span class="hljs-subst">{<span class="hljs-built_in">str</span>(e)}</span>&quot;</span>)<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L145">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="145"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START -->
<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L146">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="146"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-keyword">def</span> <span class="hljs-title function_">classify_batches</span>(<span class="hljs-params">name_list, batch_size=<span class="hljs-number">10</span>, wait=<span class="hljs-number">2</span></span>):<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L147">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="147"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-comment"># Store the results</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L148">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="148"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> all_results = {}<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L149">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="149"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START -->
<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L150">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="150"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-comment"># Batch up the list</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L151">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="151"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> batch_list = get_batch_list(name_list, n=batch_size)<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L152">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="152"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START -->
<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L153">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="153"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-comment"># Loop through the list in batches</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L154">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="154"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-keyword">for</span> batch <span class="hljs-keyword">in</span> track(batch_list):<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L155">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="155"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-keyword">try</span>:<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L156">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="156"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-comment"># Classify it</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L157">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="157"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> batch_results = classify_payees(batch)<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L158">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="158"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START -->
<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L159">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="159"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-comment"># Add it to the results</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L160">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="160"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> all_results.update(batch_results)<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L161">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="161"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START -->
<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L162">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="162"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-comment"># Tap the brakes</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L163">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="163"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> time.sleep(wait)<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L164">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="164"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-keyword">except</span> Exception <span class="hljs-keyword">as</span> e:<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L165">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="165"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;Error processing batch: <span class="hljs-subst">{e}</span>&quot;</span>, file=sys.stderr)<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L166">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="166"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-comment"># Continue with other batches</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L167">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="167"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START -->
<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L168">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="168"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-comment"># Return the results</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L169">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="169"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-keyword">return</span> pd.DataFrame(<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L170">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="170"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> all_results.items(),<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L171">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="171"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> columns=[<span class="hljs-string">&quot;payee&quot;</span>, <span class="hljs-string">&quot;category&quot;</span>]<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L172">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="172"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> )<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L173">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="173"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START -->
<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L174">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="174"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-comment"># Run classification on test data</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L175">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="175"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START -->llm_df = classify_batches(<span class="hljs-built_in">list</span>(test_input.payee))<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L176">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="176"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START -->
<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L177">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="177"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-comment"># -- Gradio interface function --</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L178">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="178"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-keyword">def</span> <span class="hljs-title function_">classify_business_names</span>(<span class="hljs-params">input_text</span>):<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L179">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="179"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-comment"># Parse input text into list of names</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L180">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="180"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> name_list = [line.strip() <span class="hljs-keyword">for</span> line <span class="hljs-keyword">in</span> input_text.splitlines() <span class="hljs-keyword">if</span> line.strip()]<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L181">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="181"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <!-- HTML_TAG_END --></td>
</tr><tr class="" id="L182">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="182"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-keyword">if</span> <span class="hljs-keyword">not</span> name_list:<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L183">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="183"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-keyword">return</span> json.dumps({<span class="hljs-string">&quot;error&quot;</span>: <span class="hljs-string">&quot;No business names provided. Please enter at least one business name.&quot;</span>})<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L184">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="184"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <!-- HTML_TAG_END --></td>
</tr><tr class="" id="L185">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="185"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-keyword">try</span>:<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L186">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="186"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> result = classify_payees(name_list)<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L187">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="187"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-keyword">return</span> json.dumps(result, indent=<span class="hljs-number">2</span>)<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L188">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="188"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-keyword">except</span> Exception <span class="hljs-keyword">as</span> e:<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L189">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="189"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> <span class="hljs-keyword">return</span> json.dumps({<span class="hljs-string">&quot;error&quot;</span>: <span class="hljs-string">f&quot;Classification failed: <span class="hljs-subst">{<span class="hljs-built_in">str</span>(e)}</span>&quot;</span>})<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L190">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="190"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START -->
<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L191">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="191"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-comment"># -- Launch the demo --</span><!-- HTML_TAG_END --></td>
</tr><tr class="" id="L192">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="192"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START -->demo = gr.Interface(<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L193">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="193"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> fn=classify_business_names,<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L194">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="194"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> inputs=gr.Textbox(lines=<span class="hljs-number">10</span>, placeholder=<span class="hljs-string">&quot;Enter business names, one per line&quot;</span>),<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L195">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="195"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> outputs=gr.JSON(),<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L196">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="196"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> title=<span class="hljs-string">&quot;Business Category Classifier&quot;</span>,<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L197">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="197"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> description=<span class="hljs-string">&quot;Enter business names and get a classification: Restaurant, Bar, Hotel, or Other.&quot;</span>,<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L198">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="198"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> examples=[<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L199">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="199"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> [<span class="hljs-string">&quot;Marriott Hotel\nTaco Bell\nThe Tipsy Cow\nStarbucks\nApple Store&quot;</span>]<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L200">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="200"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> ]<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L201">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="201"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START -->)<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L202">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="202"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START -->
<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L203">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="203"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --><span class="hljs-keyword">if</span> __name__ == <span class="hljs-string">&quot;__main__&quot;</span>:<!-- HTML_TAG_END --></td>
</tr><tr class="" id="L204">
<td class="blob-line-num w-1 cursor-pointer select-none pl-5 pr-3 text-right align-top text-gray-300 hover:text-black dark:hover:text-white" data-line-num="204"></td>
<td class="blob-line overflow-visible whitespace-pre px-3"><!-- HTML_TAG_START --> demo.launch(share=<span class="hljs-literal">True</span>)<!-- HTML_TAG_END --></td>
</tr></tbody></table></div>
</div></div></div></div></section></div></main>
</div>
<script>
import("\/front\/build\/kube-1458491\/index.js");
window.moonSha = "kube-1458491\/";
window.__hf_deferred = {};
</script>
<!-- Stripe -->
<script>
if (["hf.co", "huggingface.co"].includes(window.location.hostname)) {
const script = document.createElement("script");
script.src = "https://js.stripe.com/v3/";
script.async = true;
document.head.appendChild(script);
}
</script>
</body>
</html>