Jelajahi Sumber

添加Streamlit OCR验证器的调试配置,支持在集成终端中运行并设置环境变量

zhch158_admin 2 bulan lalu
induk
melakukan
9721bd4ab1
1 mengubah file dengan 16 tambahan dan 0 penghapusan
  1. 16 0
      .vscode/launch.json

+ 16 - 0
.vscode/launch.json

@@ -15,6 +15,22 @@
 			"envFile": "${workspaceFolder}/.env",
 			// "args": ["-t", "How can I push a model to the Hub?", "-b", "dashscope", "-m", "openai/qwen-max", "-a", "code"],
 			"justMyCode": false
+		},
+		{
+			"name": "streamlit_ocr_validator",
+			"type": "debugpy",
+			"request": "launch",
+			// "program": "${file}",
+			"module": "streamlit",
+			"console": "integratedTerminal",
+			"cwd": "${workspaceFolder}",
+			"env": {"PYTHONPATH":"${workspaceFolder};${env:PYTHONPATH}"},
+			"envFile": "${workspaceFolder}/.env",
+			"args": [
+				"run", "streamlit_ocr_validator.py", 
+				"--theme.base=light"
+			],
+			"justMyCode": false
 		}
 	]
 }