-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.py
35 lines (28 loc) · 992 Bytes
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import sqlite3
from flask import Flask, render_template, request, url_for, flash, redirect, send_file
from werkzeug.exceptions import abort
app = Flask(__name__)
@app.route('/')
def latest_3d_loader():
frame_path = "/SSC/[email protected]/archery/19-08-2022_09-44-30_amy/processed/processed_pose_00023"
return render_template('3dviewer.html',
frame_path=frame_path)
@app.route('/PoseTransfer')
def pose_transfer():
return render_template('posetransfer.html')
@app.route('/VRMode')
def vr_mode():
return render_template('vrmode.html')
@app.route("/download")
def download():
try:
return send_file("static/assets/smpl.glb", as_attachment=True, download_name="model.obj")
except Exception as e:
return str(e)
@app.route('/upload', methods=['PUT'])
def upload_file():
file = request.data
with open('static/user_data/' + request.args.get('filename'), 'wb') as f:
f.write(file)
return 'File Finish Uploaded.'
app.run(debug=True)