・Linux/macOSの場合
source .venv/bin/activate
・Windowsの場合
.venv\Scripts\activate
ターミナルで以下の操作を行ってください.
cd dev_app
i) dev_app/frontend/vue.config.jsの outputDir を"../backend_old/app/dist"に変更(defaultではこうなってます)
module.exports = defineConfig({
transpileDependencies: true,
assetsDir: "static",
outputDir: path.resolve(__dirname, "../backend_old/app/dist"),
})ii)ターミナルで以下を実行
python backend_old/app/app.py
i) dev_app/frontend/vue.config.jsの outputDir を"../backend_new/app/dist"に変更
module.exports = defineConfig({
transpileDependencies: true,
assetsDir: "static",
outputDir: path.resolve(__dirname, "../backend_new/app/dist"),
})ii)ターミナルで以下を実行
python backend_new/app/app.py
- 表示されたURLにアクセス
Note
OpenAI API 関係のプログラムを実行するためにはAPIキーが必要です.
フォルダ下のどこでも良いので.envファイルを作成し,APIキーを環境変数として登録してください.
OPENAI_API_KEY = "sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"OCR機能を使うためにはGoogle Vision APIのキーが必要です.
こちらの記事を参考にGoogle > > Cloud Platformのアカウントを作成し,Vision APIを有効化してください.以下の形式の秘密鍵(jsonファイル)がダウンロードされるので,ファイル名をkey.jsonとし,dev_appフォルダの直下に配置してください.
{
"type": "xxxx"
"project_id": "xxxx",
"private_key_id": "xxxx",
"private_key": "xxxx",
"client_email": "xxxx",
"client_id": "xxxx",
"auth_uri": "xxxx",
"token_uri": "xxxx",
"auth_provider_x509_cert_url": "xxxx",
"client_x509_cert_url": "xxxx",
"universe_domain": "xxxx"
}