buletomato25 commited on
Commit
e6c5000
·
1 Parent(s): 91f546c
__pycache__/analyze.cpython-310.pyc CHANGED
Binary files a/__pycache__/analyze.cpython-310.pyc and b/__pycache__/analyze.cpython-310.pyc differ
 
__pycache__/process.cpython-310.pyc CHANGED
Binary files a/__pycache__/process.cpython-310.pyc and b/__pycache__/process.cpython-310.pyc differ
 
__pycache__/transcription.cpython-310.pyc CHANGED
Binary files a/__pycache__/transcription.cpython-310.pyc and b/__pycache__/transcription.cpython-310.pyc differ
 
app.py CHANGED
@@ -52,21 +52,7 @@ def confirm():
52
  def reset_html():
53
  return render_template('reset.html')
54
 
55
- @app.route('/login', methods=['POST', 'GET'])
56
- def login():
57
- global users#グローバル変数を編集できるようにする
58
- try:
59
- data = request.get_json()
60
- name = data['name'] # 名前を取得
61
- if name in users:
62
- print("名前はリストに存在します。")
63
- index()
64
- else:
65
- print("名前はリストに存在しません。")
66
 
67
- except Exception as e:
68
- print("Error in /upload_base_audio:", str(e))
69
- return jsonify({"error": "サーバーエラー", "details": str(e)}), 500
70
 
71
  #メンバー削除&累積音声削除
72
  @app.route('/reset_member', methods=['GET', 'POST'])
 
52
  def reset_html():
53
  return render_template('reset.html')
54
 
 
 
 
 
 
 
 
 
 
 
 
55
 
 
 
 
56
 
57
  #メンバー削除&累積音声削除
58
  @app.route('/reset_member', methods=['GET', 'POST'])
static/feedback.js CHANGED
@@ -4,7 +4,7 @@ async function getTranscription() {
4
  if (!response.ok) {
5
  throw new Error("HTTP error! status: ${response.status}");
6
  }
7
- const data = await response.json;
8
  const results = data.response;
9
  } catch (error) {
10
  console.error("Failed to fetch transcription", error);
@@ -22,6 +22,7 @@ async function getAnalysis() {
22
  }
23
 
24
  const data = await response.json();
 
25
  const results = data.results;
26
  const analysis = results.deepseek_analysis;
27
 
@@ -59,4 +60,6 @@ async function getAnalysis() {
59
  }
60
  }
61
 
62
- window.onload = getAnalysis();
 
 
 
4
  if (!response.ok) {
5
  throw new Error("HTTP error! status: ${response.status}");
6
  }
7
+ const data = await response.json();
8
  const results = data.response;
9
  } catch (error) {
10
  console.error("Failed to fetch transcription", error);
 
22
  }
23
 
24
  const data = await response.json();
25
+ console.log("分析データ取得:", data); // ←構造確認用
26
  const results = data.results;
27
  const analysis = results.deepseek_analysis;
28
 
 
60
  }
61
  }
62
 
63
+ window.onload = () => {
64
+ getAnalysis();
65
+ };
static/login.js DELETED
@@ -1,41 +0,0 @@
1
- let mediaRecorder;
2
- let audioChunks = [];
3
- let userCount = 0; // 追加されたメンバー数を保持
4
- let isRecording = false; // 録音中かどうかを判定するフラグ
5
- let currentRecordingButton = null; // 現在録音中のボタンを保持
6
- let userNames = [];
7
-
8
- document.getElementById("login-btn").addEventListener("click", function () {
9
- const nameInput = document.querySelector('#people-list input[name="name"]');
10
- const name = nameInput ? nameInput.value.trim() : "";
11
-
12
- if (!name) {
13
- alert("名前を入力してください");
14
- return;
15
- }
16
-
17
- fetch("/login", {
18
- method: "POST",
19
- headers: {
20
- "Content-Type": "application/json",
21
- },
22
- body: JSON.stringify({ name: name }),
23
- })
24
- .then((response) => response.json())
25
- .then((data) => {
26
- if (data.error) {
27
- alert("エラー: " + data.error);
28
- console.error(data.details);
29
- } else {
30
- console.log("ログイン成功:", data);
31
- // ここでUIの更新や次のアクションを追加できます
32
- }
33
- })
34
- .catch((error) => {
35
- console.error("通信エラー:", error);
36
- alert("ログイン中にエラーが発生しました");
37
- });
38
- });
39
- function Register() {
40
- window.location.href = "userregister";
41
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/login.html DELETED
@@ -1,156 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="ja">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <title>ユーザー音声登録</title>
6
- <script src="https://cdn.tailwindcss.com"></script>
7
- <script src="https://use.fontawesome.com/releases/v5.10.0/js/all.js"></script>
8
- <style>
9
- @keyframes pulse-scale {
10
- 0%,
11
- 100% {
12
- transform: scale(1);
13
- }
14
- 50% {
15
- transform: scale(1.1);
16
- }
17
- }
18
- .animate-pulse-scale {
19
- animation: pulse-scale 1s infinite;
20
- }
21
-
22
- /* Record Button Styles */
23
- .record-button {
24
- width: 50px;
25
- height: 50px;
26
- background-color: transparent;
27
- border-radius: 50%;
28
- border: 2px solid white;
29
- display: flex;
30
- justify-content: center;
31
- align-items: center;
32
- cursor: pointer;
33
- box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
34
- transition: all 0.3s ease;
35
- }
36
- .record-icon {
37
- width: 35px;
38
- height: 35px;
39
- background-color: #d32f2f;
40
- border-radius: 50%;
41
- transition: all 0.3s ease;
42
- }
43
- .record-button.recording .record-icon {
44
- background-color: #f44336; /* 録音中は赤色 */
45
- border-radius: 4px; /* 録音時に赤い部分だけ四角にする */
46
- }
47
- .recording .record-icon {
48
- width: 20px;
49
- height: 20px;
50
- border-radius: 50%;
51
- }
52
-
53
- /* Main Container */
54
- body {
55
- background: linear-gradient(135deg, #2c3e50, #1f2937);
56
- display: flex;
57
- align-items: center;
58
- justify-content: center;
59
- min-height: 100vh;
60
- font-family: "Arial", sans-serif;
61
- }
62
-
63
- /* Main Content Wrapper */
64
- .main-content {
65
- border: 5px solid rgba(255, 255, 255, 0.2);
66
- padding: 2rem;
67
- border-radius: 1rem;
68
- width: 90%;
69
- max-width: 500px;
70
- background-color: rgba(0, 0, 0, 0.3);
71
- box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
72
- text-align: center;
73
- }
74
-
75
- /* Title */
76
- .main-title {
77
- font-size: 2.5rem;
78
- font-weight: bold;
79
- margin-bottom: 1.5rem;
80
- color: #fff;
81
- text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
82
- }
83
-
84
- /* Buttons */
85
- .action-button {
86
- margin-top: 1rem;
87
- padding: 0.75rem 1.5rem;
88
- border-radius: 0.5rem;
89
- cursor: pointer;
90
- transition: background-color 0.2s ease;
91
- width: 100%;
92
- }
93
-
94
- .action-button:hover {
95
- background-color: rgba(55, 65, 81, 0.7);
96
- }
97
-
98
- .back-button {
99
- background-color: #607d8b; /* 落ち着いたグレー */
100
- color: white;
101
- }
102
-
103
- .add-button {
104
- background-color: #4caf50; /* 落ち着いた緑色 */
105
- color: white;
106
- }
107
-
108
- /* Disabled State */
109
- .disabled {
110
- opacity: 0.5;
111
- pointer-events: none;
112
- }
113
-
114
- /* Responsive Design */
115
- @media (max-width: 640px) {
116
- .main-content {
117
- padding: 1.5rem;
118
- }
119
- }
120
- </style>
121
- </head>
122
- <body>
123
- <!-- Main Content Wrapper -->
124
- <div class="main-content relative">
125
- <!-- Title -->
126
- <div class="main-title">ログイン</div>
127
-
128
- <!-- HTML -->
129
- <div id="people-list" class="space-y-4">
130
- <input
131
- type="text"
132
- name="name"
133
- placeholder="名前を入力"
134
- value="${userName}"
135
- class="flex-1 px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 bg-gray-700 text-white"
136
- />
137
- </div>
138
-
139
- <!-- Add Button -->
140
- <button id="login-btn" class="action-button add-button">
141
- <i class="fas fa-user-plus"></i> ログイン
142
- </button>
143
-
144
- <!-- Back Button -->
145
- <button
146
- id="backButton"
147
- onclick="Register()"
148
- class="action-button back-button"
149
- >
150
- 新規録音
151
- </button>
152
- </div>
153
-
154
- <script src="{{ url_for('static', filename='login.js') }}"></script>
155
- </body>
156
- </html>