创建的服务器是 IP 服务器
- IP 地址为电脑连上的局域网的 IP 地址
- 端口号为 8000
├── server.py // 服务器主文件├── images
├── input
│ ├── image1.jpg
│ ├── image2.jpg
│ ├──...
├── method_name
│ ├── image1.jpg
│ ├── image2.jpg
│ ├──...
├──...git clone https://github.com/Yangzhichen763/Easy-User-Study-Server.git
cd Easy-User-Study-Serverpip install -r requirements.txtpython server.py启动完服务器后:
- 访问
http://{IP地址}:8000即可看到 User-Study 的登录页面 - 访问
http://{IP地址}:8000/server即可看到服务器中的内容
- 自定义首页:在
index.html中进行修改 - 自定义 User-Study 界面:在
pages/interface.html中进行修改- 在
pages/templates/中有一些预设的模板,可以直接使用吗,比如:interface_click.html文件专注于选择更好的图片interface_rating专注于评分图片)
- 在
- 自定义服务器内容:在
server.py的UserStudyHandler中进行修改- 对于需要通过少量参数获取的数据,在
do_GET函数中添加条件分支 - 对于需要通过大量数据获取的数据,在
do_POST函数中添加条件分支
- 对于需要通过少量参数获取的数据,在
- 使用 Flask 作为服务器 Web 开发框架


