Nai3DrawServer
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 🏅
Metadata
Release files for novelai_gen 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| novelai_gen-0.1.1.tar.gz | 5.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| novelai_gen-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.9 kB
Release files / novelai_gen-0.1.1.tar.gz
| Download URL | novelai_gen-0.1.1.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c1afff1ca8d1a5eabe9288e2659d83f73aaf8681856a9acd95ce0e3a823f84e6
|
|
BLAKE2b-256 checksum How to use checksums |
d24ec7bebc114f510fa7465b11ed5b790f7e2b6857a3a52ab83a580210cad7e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.12.2 CPython/3.10.12
|
Release files / novelai_gen-0.1.1-py3-none-any.whl
| Download URL | novelai_gen-0.1.1-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1ebf6db2abf4eeb30c71cbdf9ce0e7895a71a24fc726a809d4d9a32b1a49c8b0
|
|
BLAKE2b-256 checksum How to use checksums |
890742705a1720d1a4cc882e9e67d38aa92d97f1b0a33e8285e8ffc325d3cc48
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.12.2 CPython/3.10.12
|