https://github.com/jacoblincool/gradio-client-lite
A zero-dependency, platform-independent, and lightweight Gradio client.
https://github.com/jacoblincool/gradio-client-lite
client gradio
Last synced: 4 months ago
JSON representation
A zero-dependency, platform-independent, and lightweight Gradio client.
- Host: GitHub
- URL: https://github.com/jacoblincool/gradio-client-lite
- Owner: JacobLinCool
- License: mit
- Created: 2024-10-04T19:04:02.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-05T18:16:21.000Z (over 1 year ago)
- Last Synced: 2025-09-30T13:23:08.516Z (9 months ago)
- Topics: client, gradio
- Language: TypeScript
- Homepage: http://jacoblin.cool/gradio-client-lite/
- Size: 53.7 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# gradio-client-lite
A zero-dependency, platform-independent, and lightweight Gradio client.
Works on serverless platforms, replica affinity mechanism included.
## Features
- Zero dependencies
- Platform-independent
- Works on serverless platforms
- Includes replica affinity mechanism
## Usage
```ts
import { GradioClientLite } from "gradio-client-lite";
// Connect to a Gradio app on HuggingFace Spaces
const client = await GradioClientLite.connect("black-forest-labs/FLUX.1-schnell");
// Run inference and get the result
const result = await client.predict<{ path: string }[]>("/infer", [
"An image of a cat",
0,
true,
512,
512,
4,
]);
// Download the file since we are generating an image
const res = await client.download(result[0].path);
```