userstudy / README_ADMIN.md
Wenjiawang0312
store
1618b8d

A newer version of the Gradio SDK is available: 6.5.1

Upgrade

管理员设置指南

🔐 设置管理员密码

在 Hugging Face Space 上设置

  1. 进入你的 Space 页面:https://huggingface.co/spaces/WenjiaWang/userstudy

  2. 点击 Settings (设置)

  3. 找到 Repository secrets 部分

  4. 点击 New secret

  5. 添加密钥:

    • Name: ADMIN_PASSWORD
    • Value: 你的密码(例如:MySecurePassword123!
  6. 点击 Add secret

  7. 重启 Space(如果需要)

本地运行

如果在本地运行,可以设置环境变量:

Linux/Mac:

export ADMIN_PASSWORD="your_password_here"
python app.py

Windows (CMD):

set ADMIN_PASSWORD=your_password_here
python app.py

Windows (PowerShell):

$env:ADMIN_PASSWORD="your_password_here"
python app.py

安全提示

  • ✅ 密码存储在环境变量中,不会出现在代码里
  • ✅ 其他人无法从代码中看到你的密码
  • ✅ 只有 Space 的所有者可以看到和修改 Secrets
  • ⚠️ 不要在公开的地方分享你的密码

📊 查看结果

  1. 访问你的 Space
  2. 切换到 "🔐 管理员 / Admin" 标签
  3. 输入你设置的密码
  4. 查看统计数据和下载 CSV 文件