机器学习模型嵌入与回归分析
1. 机器学习模型嵌入到 Web 应用
1.1 创建网页模板
1.1.1 评论提交页面
在评论提交页面,导入了之前定义的 _formhelpers.html 模板,使用其 render_field 函数渲染一个 TextAreaField ,用户可以在此输入电影评论,并通过页面底部的“Submit review”按钮提交。该 TextAreaField 宽 30 列,高 10 行。
1.1.2 结果页面
结果页面模板 results.html 如下:
<!doctype html>
<html>
<head>
<title>Movie Classification</title>
<link rel="stylesheet"
href="{
{ url_for('static', filename='style.css') }}">
</head>
<body>
<h3>Your movie review:</h3>
<div>{
{ content }}</div>
<h3>Prediction:</h
超级会员免费看
订阅专栏 解锁全文

被折叠的 条评论
为什么被折叠?



