Skip to main content

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


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.53.tar.gz (27.8 kB view details)

Uploaded Source

Built Distribution

rockai-0.1.53-py3-none-any.whl (33.3 kB view details)

Uploaded Python 3

File details

Details for the file rockai-0.1.53.tar.gz.

File metadata

  • Download URL: rockai-0.1.53.tar.gz
  • Upload date:
  • Size: 27.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Darwin/23.4.0

File hashes

Hashes for rockai-0.1.53.tar.gz
Algorithm Hash digest
SHA256 3b7a3d63d4c5de576284404be766937563f2fa15a56d2d0e3cad7b226bd775d5
MD5 e4b7a7375263d5c876ad9b891ca624a7
BLAKE2b-256 fef355298e4b3fcf7ca4b6bf471cf4b4bd2434030ed7068f9f816d726e6e8c6b

See more details on using hashes here.

File details

Details for the file rockai-0.1.53-py3-none-any.whl.

File metadata

  • Download URL: rockai-0.1.53-py3-none-any.whl
  • Upload date:
  • Size: 33.3 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

Hashes for rockai-0.1.53-py3-none-any.whl
Algorithm Hash digest
SHA256 d2c1ff29d8d265cca932569d802638eeed8334337028143c9d7865fa5e7355ea
MD5 f17d0b7173c1afe943f366da9fa93174
BLAKE2b-256 1a8cef8cf5370f10324a327343f81bb14d7c0a97b60e09e9892a0dbc6cc1006f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page