- install requirements. Note: when you install torch, make sure you install correct cuda version.
- go to
config.json
to setopenai
=>api_key
- (Optional) if you wanna use stable diffusion as img generation api, make sure you have start AUTOMATIC1111/stable-diffusion-webui and has start flag
--api
. And then go toconfig.json
change"image_generate_api": "dall-e"
as"image_generate_api": "sd"
. - if you wanna use line bot function, don't forget install
ffmpeg
- start server
python app.py [-h] [-l {CRITICAL,FATAL,ERROR,WARN,WARNING,INFO,DEBUG,NOTSET,critical,fatal,error,warn,warning,info,debug,notset}] [--env ENV] [--host HOST] [--port PORT]
app.py
: 程式碼進入點util.py
: 輔助函數test.py
: 用來測試用的codeconfig.json
: 設定檔
You can start the server and go to http://127.0.0.1:5000 to read the doc