diff --git a/README.md b/README.md index 4edc843..c03c1ff 100644 --- a/README.md +++ b/README.md @@ -82,12 +82,32 @@ python --version ``` +#### 使用uv环境(推荐) + +安装uv: + +```bash +# Windows +powershell -c "irm https://astral.sh/uv/install.ps1 | iex" + +# macOS/Linux +curl -LsSf https://astral.sh/uv/install.sh | sh +``` + ### 2. 安装依赖 +使用pip: + ```bash pip install -r requirements.txt ``` +使用uv: + +```bash +uv install +``` + ### 3. 配置API密钥 编辑`config.py`文件: @@ -98,10 +118,24 @@ DEEPSEEK_API_KEY = "" ### 4. 启动应用 +使用Python直接运行: + ```bash python app.py ``` +使用uv运行: + +```bash +uv run python app.py +``` + +使用uv的脚本命令(需要在pyproject.toml中配置): + +```bash +uv run start +``` + ### 5. 访问应用 打开浏览器访问:http://localhost:5000 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..ddf631d --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,25 @@ +[project] +name = "interview-system" +version = "0.1.0" +description = "AI面试官系统" +authors = [ + { name = "Your Name", email = "your.email@example.com" }, +] +requires-python = ">=3.8" +dependencies = [ + "flask>=2.3.0", + "requests>=2.31.0", + "python-dotenv>=1.0.0", + "gunicorn>=21.0.0", +] + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project.scripts] +start = "app:app" +serve = "gunicorn:run" + +[tool.uv] +python-version = "3.8"