Spaces:
Paused
Paused
Download node_modules/@gradio/client/index.html from sam522/GenAI_Course: direct link, hf CLI and curl.
- Browser
- Download file 809 Bytes
-
https://huggingface.co/spaces/sam522/GenAI_Course/resolve/main/node_modules/%40gradio/client/index.html
- Command line
-
hf download hf://spaces/sam522/GenAI_Course/node_modules/@gradio/client/index.html
-
curl -L -o index.html https://huggingface.co/spaces/sam522/GenAI_Course/resolve/main/node_modules/%40gradio/client/index.html
809 Bytes
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
| <title>Client</title> | |
| <script type="module"> | |
| import { Client } from "./dist/index.js"; | |
| console.log(Client); | |
| const client = await Client.connect("pngwn/chatinterface_streaming_echo"); | |
| async function run(message, n) { | |
| // console.log(client); | |
| const req = client.submit("/chat", { | |
| message | |
| }); | |
| console.log("start"); | |
| for await (const c of req) { | |
| if (c.type === "data") { | |
| console.log(`${n}: ${c.data[0]}`); | |
| } | |
| } | |
| console.log("end"); | |
| return "hi"; | |
| } | |
| run("My name is frank", 1); | |
| run("Hello there", 2); | |
| console.log("boo"); | |
| </script> | |
| </head> | |
| <body> | |
| <div id="app"></div> | |
| </body> | |
| </html> | |