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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rockai-0.1.72-py3-none-any.whl (34.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for rockai-0.1.72.tar.gz
Algorithm Hash digest
SHA256 6470fff3fe386948787b12b23aebe18289ba1da70a38061d07a98701bc8965eb
MD5 34b148e5e15921fc3c538bc1f0de0b58
BLAKE2b-256 6c34ebe9021ba860a68eba1f1ed5f9004401aa372af5f68e228c3c1067dd6c2a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rockai-0.1.72-py3-none-any.whl
  • Upload date:
  • Size: 34.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.7 Darwin/23.4.0

File hashes

Hashes for rockai-0.1.72-py3-none-any.whl
Algorithm Hash digest
SHA256 c104ec3baa92788203f10044f20697999d4dfd968c455fef4ae36021d7c00d2d
MD5 0471ff69a6a7fd285d1c4492bf89b00f
BLAKE2b-256 5bd0993b298b068f74ce70c3fef1ee3651d9a45b1998c5e6a63335fea8554407

See more details on using hashes here.

Supported by

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