Public
Script
1
2
3
4
5
6
7
8
9
10
11
12
import { listFiles, whoAmI } from "npm:@huggingface/hub";
import type { Credentials, RepoDesignation } from "npm:@huggingface/hub";
const repo: RepoDesignation = { name: "lmsys/chatbot-arena-leaderboard", type: "space" };
// { RepoFullName: "spaces/lmsys/chatbot-arena-leaderboard" };
const credentials: Credentials = { accessToken: Deno.env.get("HF_TOKEN") };
// const { name: username } = await whoAmI({ credentials });
for await (const fileInfo of listFiles({ repo })) {
console.log(fileInfo);
}
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
August 9, 2024