Python SDK for RockAI.online
Project description
Setup
Python SDK for inference and training for RockAI
# Install package using pip
pip install rockai-cli-app
from rockai_cli_app import Client
import asyncio
my_client = Client()
# Function to run the asynchronous function and print the result
async def main():
result = await my_client.run_async(
version="001bb81139b01780380407b4106ac681df46108e002eafbeb9ccb2d8faca42e1",
input={
"width": 1024,
"height": 1024,
"prompt": "a cartoon of a IRONMAN fighting with HULK, wall painting",
"guidance_scale": 3,
"negative_prompt": "(deformed, distorted, disfigured:1.3), poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, (mutated hands and fingers:1.4), disconnected limbs, mutation, mutated, ugly, disgusting, blurry, amputation, NSFW",
"num_inference_steps": 15,
}
)
print("Result:", result)
# Run the main function using asyncio.run
if __name__ == "__main__":
asyncio.run(main())
# clean docker space
docker system prune --all --force --volumes
Development
- Python version 3.9.19
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rockai-0.1.8.tar.gz
(25.7 kB
view details)
Built Distribution
rockai-0.1.8-py3-none-any.whl
(30.5 kB
view details)
File details
Details for the file rockai-0.1.8.tar.gz
.
File metadata
- Download URL: rockai-0.1.8.tar.gz
- Upload date:
- Size: 25.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.3 Darwin/23.4.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22c78816ed2744a0691719376a50141ed6313fe684b9e02e860f4f344a15a040 |
|
MD5 | c4c561d2d71f02c81f241e2ead20ee40 |
|
BLAKE2b-256 | be15024b81d1d5c6e09188f14e84eccfa2e739789492c62ce1e0a176fd0da935 |
File details
Details for the file rockai-0.1.8-py3-none-any.whl
.
File metadata
- Download URL: rockai-0.1.8-py3-none-any.whl
- Upload date:
- Size: 30.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.3 Darwin/23.4.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3969b663eb1c031b310f7b1dda49eaa2fe8b7ed25b23457b9ac05d30eebc09b |
|
MD5 | ea39415fd54fb8537d52f265852ec57c |
|
BLAKE2b-256 | 66eca1791e5ed53e1b0ce32fc1646f6cbade2b63c47bc4e8c5e4ba12708604ec |