Skip to content

silbull/RittAI-Canvas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RittAI Canvas

実行方法

1. Venvによる仮想環境の作成

1. VSCodeでコマンドパレットを開き,Python: Create Environmentを選択.

2. Venvを選択

3. Pythonのバージョンを選択.自身の環境に入っているバージョンを選択することができます.3.10での動作は確認済みです.3.10以上を推奨します.

4. 依存環境を選択.ここでは,requirements.txtを選択してください

5. 仮装環境のアクティベート

・Linux/macOSの場合

source .venv/bin/activate

・Windowsの場合

.venv\Scripts\activate

2. ポートの立ち上げ

ターミナルで以下の操作を行ってください.

1. dev_appディレクトリに移動

cd dev_app

2. ポートの立ち上げ

GPT-4によるGeogebra Script生成を使う

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

GPT-3.5 + Function CallingによるGeogebra Script生成を使う

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
  1. 表示されたURLにアクセス

Note

各自用意が必要な部分

1.OpenAI API Key

OpenAI API 関係のプログラムを実行するためにはAPIキーが必要です. フォルダ下のどこでも良いので.envファイルを作成し,APIキーを環境変数として登録してください.

OPENAI_API_KEY = "sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

2. Google Vision API Key

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"
}

About

未踏福岡コンソーシアムのリポジトリ

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •