Spaces:
Running
Running
Update templates/feedback.html
Browse files- templates/feedback.html +128 -158
templates/feedback.html
CHANGED
@@ -5,184 +5,154 @@
|
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
6 |
<title>会話フィードバック画面</title>
|
7 |
<script src="https://cdn.tailwindcss.com"></script>
|
8 |
-
<script>
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
return "素晴らしい";
|
20 |
}
|
21 |
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
}
|
33 |
}
|
34 |
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
}
|
43 |
-
|
44 |
-
const data = await response.json();
|
45 |
-
const results = data.results;
|
46 |
-
const analysis = results.deepseek_analysis;
|
47 |
-
|
48 |
-
// 変数に格納
|
49 |
-
const conversationLevel = analysis.conversationLevel;
|
50 |
-
const harassmentPresent = analysis.harassmentPresent;
|
51 |
-
const harassmentType = analysis.harassmentType;
|
52 |
-
const repetition = analysis.repetition;
|
53 |
-
const pleasantConversation = analysis.pleasantConversation;
|
54 |
-
const blameOrHarassment = analysis.blameOrHarassment;
|
55 |
-
|
56 |
-
// コンソールに表示
|
57 |
-
console.log(
|
58 |
-
conversationLevel,
|
59 |
-
harassmentPresent,
|
60 |
-
harassmentType,
|
61 |
-
repetition,
|
62 |
-
pleasantConversation,
|
63 |
-
blameOrHarassment
|
64 |
-
);
|
65 |
-
|
66 |
-
// DOMに表示
|
67 |
-
document.getElementById(
|
68 |
-
"level"
|
69 |
-
).innerText = `会話レベル: ${conversationLevel}`;
|
70 |
-
document.getElementById(
|
71 |
-
"Harassment_bool"
|
72 |
-
).innerText = `ハラスメントの有無: ${harassmentPresent}`;
|
73 |
-
document.getElementById(
|
74 |
-
"Harassment_type"
|
75 |
-
).innerText = `ハラスメントの種類: ${harassmentType}`;
|
76 |
-
document.getElementById(
|
77 |
-
"Harassment_loop"
|
78 |
-
).innerText = `繰り返しの程度: ${repetition}`;
|
79 |
-
document.getElementById(
|
80 |
-
"Harassment_comfort"
|
81 |
-
).innerText = `会話の心地よさ: ${pleasantConversation}`;
|
82 |
-
document.getElementById(
|
83 |
-
"Harassment_volume"
|
84 |
-
).innerText = `非難またはハラスメントの程度: ${blameOrHarassment}`;
|
85 |
-
} catch (error) {
|
86 |
-
console.error("Failed to fetch analysis data:", error);
|
87 |
-
}
|
88 |
}
|
89 |
|
90 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
const labels = ["項目1", "項目2", "項目3", "項目4", "項目5"];
|
96 |
|
97 |
-
|
98 |
-
|
99 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
}
|
108 |
|
109 |
-
|
110 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
}
|
112 |
-
|
113 |
-
|
|
|
114 |
}
|
115 |
-
</
|
116 |
</head>
|
117 |
-
<body
|
118 |
-
class="
|
119 |
-
|
120 |
-
|
121 |
-
<div class="text-3xl font-bold mb-4" id="level">話者Lv:</div>
|
122 |
-
<div class="text-xl font-semibold mb-6" id="Harassment_bool">
|
123 |
-
素晴らしい
|
124 |
-
</div>
|
125 |
-
<div class="text-xl font-semibold mb-6" id="Harassment_type">
|
126 |
-
素晴らしい
|
127 |
-
</div>
|
128 |
-
<div class="text-xl font-semibold mb-6" id="Harassment_loop">
|
129 |
-
素晴らしい
|
130 |
-
</div>
|
131 |
-
<div class="text-xl font-semibold mb-6" id="Harassment_comfort">
|
132 |
-
素晴らしい
|
133 |
-
</div>
|
134 |
-
<div class="text-xl font-semibold mb-6" id="Harassment_volume">
|
135 |
-
素晴らしい
|
136 |
-
</div>
|
137 |
-
<!--
|
138 |
-
<div class="space-y-2">
|
139 |
-
<div class="bar-container flex items-center">
|
140 |
-
<span class="bar-label w-20 mr-2"></span>
|
141 |
-
<div class="bar w-full h-6 bg-gray-700 rounded-full overflow-hidden">
|
142 |
-
<div class="bar-fill h-full bg-blue-500"></div>
|
143 |
-
</div>
|
144 |
-
</div>
|
145 |
-
<div class="bar-container flex items-center">
|
146 |
-
<span class="bar-label w-20 mr-2"></span>
|
147 |
-
<div class="bar w-full h-6 bg-gray-700 rounded-full overflow-hidden">
|
148 |
-
<div class="bar-fill h-full bg-orange-400"></div>
|
149 |
-
</div>
|
150 |
-
</div>
|
151 |
-
<div class="bar-container flex items-center">
|
152 |
-
<span class="bar-label w-20 mr-2"></span>
|
153 |
-
<div class="bar w-full h-6 bg-gray-700 rounded-full overflow-hidden">
|
154 |
-
<div class="bar-fill h-full bg-blue-500"></div>
|
155 |
-
</div>
|
156 |
-
</div>
|
157 |
-
<div class="bar-container flex items-center">
|
158 |
-
<span class="bar-label w-20 mr-2"></span>
|
159 |
-
<div class="bar w-full h-6 bg-gray-700 rounded-full overflow-hidden">
|
160 |
-
<div class="bar-fill h-full bg-orange-400"></div>
|
161 |
-
</div>
|
162 |
-
</div>
|
163 |
-
<div class="bar-container flex items-center">
|
164 |
-
<span class="bar-label w-20 mr-2"></span>
|
165 |
-
<div class="bar w-full h-6 bg-gray-700 rounded-full overflow-hidden">
|
166 |
-
<div class="bar-fill h-full bg-red-500"></div>
|
167 |
-
</div>
|
168 |
-
</div>
|
169 |
-
</div>
|
170 |
-
-->
|
171 |
|
172 |
-
|
|
|
173 |
<button
|
174 |
-
|
175 |
-
class="
|
|
|
176 |
>
|
177 |
-
|
178 |
</button>
|
179 |
-
|
180 |
-
|
181 |
-
|
|
|
|
|
182 |
>
|
183 |
-
|
184 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
</div>
|
186 |
</div>
|
|
|
|
|
187 |
</body>
|
188 |
</html>
|
|
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
6 |
<title>会話フィードバック画面</title>
|
7 |
<script src="https://cdn.tailwindcss.com"></script>
|
8 |
+
<script src="https://use.fontawesome.com/releases/v5.10.0/js/all.js"></script>
|
9 |
+
<style>
|
10 |
+
/* Main Container */
|
11 |
+
body {
|
12 |
+
background: linear-gradient(135deg, #2c3e50, #1f2937);
|
13 |
+
display: flex;
|
14 |
+
align-items: center;
|
15 |
+
justify-content: center;
|
16 |
+
min-height: 100vh;
|
17 |
+
font-family: "Arial", sans-serif;
|
18 |
+
color: #fff;
|
|
|
19 |
}
|
20 |
|
21 |
+
/* Main Content Wrapper */
|
22 |
+
.main-content {
|
23 |
+
border: 5px solid rgba(255, 255, 255, 0.2);
|
24 |
+
padding: 2rem;
|
25 |
+
border-radius: 1rem;
|
26 |
+
width: 90%;
|
27 |
+
max-width: 500px;
|
28 |
+
background-color: rgba(0, 0, 0, 0.3);
|
29 |
+
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
|
30 |
+
text-align: center;
|
|
|
31 |
}
|
32 |
|
33 |
+
/* Title */
|
34 |
+
.main-title {
|
35 |
+
font-size: 2.5rem;
|
36 |
+
font-weight: bold;
|
37 |
+
margin-bottom: 1.5rem;
|
38 |
+
color: #fff;
|
39 |
+
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
}
|
41 |
|
42 |
+
/* Hamburger Menu Button */
|
43 |
+
#menuButton {
|
44 |
+
background-color: rgba(255, 255, 255, 0.1);
|
45 |
+
border: none;
|
46 |
+
border-radius: 50%;
|
47 |
+
padding: 0.5rem;
|
48 |
+
cursor: pointer;
|
49 |
+
transition: background-color 0.2s ease;
|
50 |
+
}
|
51 |
|
52 |
+
#menuButton:hover {
|
53 |
+
background-color: rgba(255, 255, 255, 0.2);
|
54 |
+
}
|
|
|
55 |
|
56 |
+
/* Hamburger Menu Styles */
|
57 |
+
#menu {
|
58 |
+
position: absolute;
|
59 |
+
top: 0;
|
60 |
+
left: 0;
|
61 |
+
z-index: 10;
|
62 |
+
transform: translateX(-100%);
|
63 |
+
visibility: hidden;
|
64 |
+
opacity: 0;
|
65 |
+
background-color: rgb(31, 41, 55);
|
66 |
+
transition: transform 0.3s ease-in-out, visibility 0s 0.3s,
|
67 |
+
opacity 0.3s ease-in-out;
|
68 |
+
backdrop-filter: blur(10px);
|
69 |
+
border-right: 1px solid rgba(255, 255, 255, 0.2);
|
70 |
+
}
|
71 |
|
72 |
+
#menu.open {
|
73 |
+
transform: translateX(0);
|
74 |
+
visibility: visible;
|
75 |
+
opacity: 1;
|
76 |
+
transition: transform 0.3s ease-in-out, visibility 0s 0s,
|
77 |
+
opacity 0.3s ease-in-out;
|
78 |
}
|
79 |
|
80 |
+
#menu button {
|
81 |
+
transition: background-color 0.2s ease;
|
82 |
+
background-color: rgba(0, 0, 0, 0.1);
|
83 |
+
margin: 2px;
|
84 |
+
border-radius: 5px;
|
85 |
+
display: flex;
|
86 |
+
align-items: center;
|
87 |
+
justify-content: flex-start;
|
88 |
+
gap: 10px;
|
89 |
+
padding: 0.75rem 1rem;
|
90 |
+
width: 100%;
|
91 |
+
text-align: left;
|
92 |
+
border: none;
|
93 |
+
color: #fff;
|
94 |
+
font-size: 1rem;
|
95 |
+
cursor: pointer;
|
96 |
}
|
97 |
+
|
98 |
+
#menu button:hover {
|
99 |
+
background-color: rgba(55, 65, 81, 0.7);
|
100 |
}
|
101 |
+
</style>
|
102 |
</head>
|
103 |
+
<body>
|
104 |
+
<div class="main-content relative">
|
105 |
+
<!-- Title -->
|
106 |
+
<div class="main-title">会話フィードバック</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
|
108 |
+
<!-- Hamburger Menu -->
|
109 |
+
<div class="absolute top-4 left-4">
|
110 |
<button
|
111 |
+
id="menuButton"
|
112 |
+
class="text-white text-2xl focus:outline-none"
|
113 |
+
onclick="toggleMenu(event)"
|
114 |
>
|
115 |
+
<i class="fas fa-bars"></i>
|
116 |
</button>
|
117 |
+
|
118 |
+
<!-- Menu Content -->
|
119 |
+
<div
|
120 |
+
id="menu"
|
121 |
+
class="absolute top-0 left-0 h-full w-64 bg-gray-800 text-white transform -translate-x-full transition-transform duration-300 ease-in-out opacity-0 visibility-hidden"
|
122 |
>
|
123 |
+
<div class="px-4 py-2 text-lg font-semibold">メニュー</div>
|
124 |
+
<button onclick="showUserRegister()">
|
125 |
+
<i class="fas fa-user-plus"></i> メンバーを追加
|
126 |
+
</button>
|
127 |
+
<button onclick="showRecorder()">
|
128 |
+
<i class="fas fa-microphone"></i> 録音画面を表示
|
129 |
+
</button>
|
130 |
+
<button onclick="showResults()">
|
131 |
+
<i class="fas fa-chart-bar"></i> フィードバックを表示
|
132 |
+
</button>
|
133 |
+
<button onclick="showTalkDetail()">
|
134 |
+
<i class="fas fa-comments"></i> 会話詳細を表示
|
135 |
+
</button>
|
136 |
+
<button onclick="resetAction()">
|
137 |
+
<i class="fas fa-redo"></i> リセット
|
138 |
+
</button>
|
139 |
+
<button onclick="toggleMenu(event)">
|
140 |
+
<i class="fas fa-times"></i> 閉じる
|
141 |
+
</button>
|
142 |
+
</div>
|
143 |
+
</div>
|
144 |
+
|
145 |
+
<!-- Feedback Details -->
|
146 |
+
<div class="text-xl font-semibold mb-6" id="level">話者Lv:</div>
|
147 |
+
<div class="text-lg mb-2" id="Harassment_bool">ハラスメントの有無:</div>
|
148 |
+
<div class="text-lg mb-2" id="Harassment_type">ハラスメントの種類:</div>
|
149 |
+
<div class="text-lg mb-2" id="Harassment_loop">繰り返しの程度:</div>
|
150 |
+
<div class="text-lg mb-2" id="Harassment_comfort">会話の心地よさ:</div>
|
151 |
+
<div class="text-lg mb-2" id="Harassment_volume">
|
152 |
+
非難またはハラスメントの程度:
|
153 |
</div>
|
154 |
</div>
|
155 |
+
|
156 |
+
<script src="{{ url_for('static', filename='menu.js') }}"></script>
|
157 |
</body>
|
158 |
</html>
|