https://github.com/scristobal/craby
A Telegram bot that runs ML models on r8e.com
https://github.com/scristobal/craby
Last synced: 3 months ago
JSON representation
A Telegram bot that runs ML models on r8e.com
- Host: GitHub
- URL: https://github.com/scristobal/craby
- Owner: scristobal
- Archived: true
- Created: 2022-10-09T11:23:10.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-01T10:08:01.000Z (over 2 years ago)
- Last Synced: 2025-04-10T09:05:41.989Z (3 months ago)
- Language: Rust
- Homepage:
- Size: 133 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Craby
Craby is a Telegram bot written in Rust 🤖🦀 that runs ML models hosted in replicate.com
Currently, [Stable Diffusion](https://replicate.com/stability-ai/stable-diffusion) and [Dalee-mini](https://replicate.com/kuprel/min-dalle) are supported, both with text input only - it is not possible to set a seed or other parameters.
Give it a try The bot will answer to `/stabled a horse in space` or `/dallem a horse in space`
## Environment
Requires `TELOXIDE_TOKEN`, `R8_TOKEN` and `PUBLIC_URL` set on the environment or a `.env` file.
- `TELOXIDE_TOKEN` is the Telegram bot token, obtained from [here](https://core.telegram.org/bots#6-botfather).
- `R8_TOKEN` is your private replicate.com token [API ref](https://replicate.ai/docs/api/).
- `PUBLIC_URL` is the URL of the server where the bot is running. eg. `http://example.com/`## Debug
Use something like `ngrok` to get a public url, run with `RUST_LOG=debug cargo run`
## Notes
The public url is required for the webhook server, in the future a pooling mechanism can be used instead.
## Roadmap
- [x] Support for multiple models
- [x] Improve error handling, maybe use `thiserror`?
- [ ] Minimal website and donations
- [ ] Suport image inputs, eg. real-esrgan
- [ ] Support text to text, eg. prompt-parrot
- [ ] Support sound input, eg. openai/whisper
- [ ] (maybe) Pooling mechanism if `PUBLIC_URL` is not set.