paleDriver7
commited on
Commit
•
1c3bf31
1
Parent(s):
ae3d79e
Update backend/app.py
Browse files- backend/app.py +3 -17
backend/app.py
CHANGED
@@ -18,24 +18,10 @@ llama3_model = LlaMa3()
|
|
18 |
#def health_check():
|
19 |
# return "Service is running!", 200
|
20 |
|
21 |
-
#@app.route('/')
|
22 |
-
#def index():
|
23 |
-
# 返回 HTML 页面
|
24 |
-
# return render_template('index_s.html')
|
25 |
-
|
26 |
-
#添加一个路由来处理静态资源的请求
|
27 |
-
@app.route('/<path:filename>')
|
28 |
-
def serve_static(filename):
|
29 |
-
return send_from_directory(app.static_folder, filename)
|
30 |
-
|
31 |
-
|
32 |
-
#配置默认路由
|
33 |
-
#让 Flask 将所有非静态文件请求重定向到 index.html,以支持前端的 SPA 路由:
|
34 |
@app.route('/')
|
35 |
-
|
36 |
-
|
37 |
-
return
|
38 |
-
|
39 |
|
40 |
|
41 |
|
|
|
18 |
#def health_check():
|
19 |
# return "Service is running!", 200
|
20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
@app.route('/')
|
22 |
+
def index():
|
23 |
+
# 返回 HTML 页面
|
24 |
+
return render_template('index_s.html')
|
|
|
25 |
|
26 |
|
27 |
|