A-yum1 commited on
Commit
7323a50
·
2 Parent(s): 07bf2bc 7811276

Merge main and jinjatest

Browse files
app.py CHANGED
@@ -1,4 +1,4 @@
1
- from flask import Flask, request, jsonify, send_from_directory
2
  import base64
3
  import os
4
 
@@ -7,15 +7,16 @@ app = Flask(__name__)
7
  @app.route('/')
8
  @app.route('/index',methods=['POST'])
9
  def index():
10
- return send_from_directory(".", "index.html")
11
 
12
  @app.route('/feedback',methods=['POST'])
13
  def feedback():
14
- return send_from_directory(".","feedback.html")
15
 
16
  @app.route('/talk_detail',methods=['POST'])
17
  def talk_detail():
18
- return send_from_directory(".","talkDetail.html")
 
19
 
20
  @app.route('/upload_audio', methods=['POST'])
21
  def upload_audio():
 
1
+ from flask import Flask, request, jsonify, render_template
2
  import base64
3
  import os
4
 
 
7
  @app.route('/')
8
  @app.route('/index',methods=['POST'])
9
  def index():
10
+ return render_template('index.html')
11
 
12
  @app.route('/feedback',methods=['POST'])
13
  def feedback():
14
+ return render_template("feedback.html")
15
 
16
  @app.route('/talk_detail',methods=['POST'])
17
  def talk_detail():
18
+ return render_template("talkDetail.html")
19
+
20
 
21
  @app.route('/upload_audio', methods=['POST'])
22
  def upload_audio():
feedback.html → templates/feedback.html RENAMED
File without changes
index.html → templates/index.html RENAMED
File without changes
talkDetail.html → templates/talkDetail.html RENAMED
@@ -119,16 +119,6 @@
119
  }
120
  }
121
 
122
- // 録音画面に戻る
123
- function showRecorder() {
124
- window.location.href = "index.html";
125
- }
126
-
127
- // フィードバック画面に移動
128
- function showHistory() {
129
- window.location.href = "feedback.html";
130
- }
131
-
132
  // 初期化処理
133
  displayTranscription();
134
  </script>
 
119
  }
120
  }
121
 
 
 
 
 
 
 
 
 
 
 
122
  // 初期化処理
123
  displayTranscription();
124
  </script>