This module is designed for asynchronous use of the kandinsky neural network and easy integration into your project.
Project description
kandinsky-api-requests
Асионхронное api для использования нейросети kandinsky 3.0
ВНИМАНИЕ: После изменнеия структуры сайта, сделана работа только для api версии. Планируется "взломать" использование web версии программно.
Как использовать:
полный пример можно посмотреть в tests.py
1. text2image
model = FusionBrainApi()
async def generate():
result = await model.text2image("котик", style="ANIME")
if result["error"]:
print("Error:")
print(result["data"])
else:
img = Image.open(result["data"])
img.save('cat_anime.jpg')
print("Done!")
if __name__ == '__main__':
asyncio.run(generate())
Все стили можно посмотреть в await FusionBrainApi().get_styles():
async def read_styles():
for style in await model.get_styles():
print(style, end="\n\n")
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file AsyncKandinsky-0.0.1.tar.gz.
File metadata
- Download URL: AsyncKandinsky-0.0.1.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b8ce997625317be3497f29cbcbdc415b22e25a857da610e1ecc29041e9f23f5
|
|
| MD5 |
91f7caa7c2015252f4a428f119314baa
|
|
| BLAKE2b-256 |
c0731c41ddcab5fccc9bf8f344182f158eb7fe6a4f1024f5f93bd2c376de4c47
|
File details
Details for the file AsyncKandinsky-0.0.1-py3-none-any.whl.
File metadata
- Download URL: AsyncKandinsky-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97fc38b09f55e25ab73f2f1ccea10954cd00b70f424ba19f087e76036d8d4adf
|
|
| MD5 |
d9ea0d2432eb69b7f0d5587d48d72e0c
|
|
| BLAKE2b-256 |
4fde818167cafb704fa361bf3c2194642133586bdeca1c6077ca61d65dd59748
|