Skip to main content

Gen Image From Novelai

Project description

Nai3DrawServer

PyPI version Downloads Downloads

Install 💻

pip install novelai_gen

Usage 🖥️

from pydantic import SecretStr

from novelai_gen import CurlSession, NovelAiInference, NaiResult

globe_s = CurlSession(jwt_token=SecretStr("555"))
_res = NovelAiInference.build(prompt="1girl").generate(session=globe_s)
_res: NaiResult
print(_res)

Server Usage 🖥️

🔧 Config

Use the following commands to copy and edit the environment configuration file:

cd conf_dir
cp secrets.exp.toml .secrets.toml
nano .secrets.toml

🚀 Run

Here's how to run the server in your terminal:

pip install pdm
pdm install
pdm run python main.py

PM2 🔄

These instructions help you start PM2 hosting and set it to automatically restart:

apt install npm
npm install pm2 -g
pip install pdm
pdm install
pm2 start pm2.json
pm2 stop pm2.json
pm2 restart pm2.json

📚 Docs

To view interface documentation and debug, visit the /docs page.

Acknowledgement 🏅

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

novelai_gen-0.1.0.tar.gz (5.0 kB view hashes)

Uploaded Source

Built Distribution

novelai_gen-0.1.0-py3-none-any.whl (5.8 kB view hashes)

Uploaded Python 3

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