Look into src/gpt3/settings.py
and change SECRET_KEY
and ALLOWED_HOSTS
!
Project have two env variables, look into .env.temlpate
. If you are want to use Docker-Compose way, so you should create .env
file. HOST_IP
is allowed IPs for you backend (0.0.0.0
= Allow all). HOST_PORT
is a port for your backend
If you are want to use Docker way, so you should pass this variables in command
You can just start docker-compose
$ docker-compose up -d
Done, now you can use endpoints
You should have too many memory for start docker. If docker build was killed use Install packages way.
You can build a docker container
$ docker build --build-arg HOST_IP=0.0.0.0 --build-arg HOST_PORT=3000 -t rugpt3 .
And run it
$ docker run -d --name ruGP3-Apache rugpt3
You should have too many memory for start docker. If docker build was killed use Python way
$ pip install requirements.txt
In example below 0.0.0.0 is a IP. If you don't want share access and use local only, just remove this IP. 10000 is a port for app
$ python manage.py runserver 0.0.0.0:10000
$ py manage.py runserver 0.0.0.0:10000
You can change it in src/rpute/urls.py
Generate text on Russian
Endpoint: /gpt3/text?text=&maxLength=
- text: string. Text for start.
- maxLength: number. Recomend max length for text.
Generate title for text on Russian
Endpoint: /gpt3/title?text=
- text: string. Title will be generated for this text.
Generate image by a text on Russian
Endpoint: /gpt3/image?text=
- text: string. Short description for image