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

Uploaded Source

Built Distribution

rockai-0.1.7-py3-none-any.whl (30.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rockai-0.1.7.tar.gz
  • Upload date:
  • Size: 25.6 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.7.tar.gz
Algorithm Hash digest
SHA256 29e563939d133d774132e22f378fdc627c90abcd952602243cb00324025a387a
MD5 6010dbbc261a3dc021c68e6e9351910e
BLAKE2b-256 7fe192a147a72c0bdf330e53d33e7b359c7fbcd8970ae95f8ffe1a16705fa412

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rockai-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 30.4 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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 c8c9daf6466659539afbb2fe3244df8f99de5b746a7eb8c7f1fff017a13439ed
MD5 477c291f3aa93d841352a2e8b147991c
BLAKE2b-256 a765a1189f5b9e92f1c0c1942c2e5e98442bdba12ff3f7da4bd1392411d1fbe4

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