Spaces:
Sleeping
Sleeping
Add report for week 2
Browse files- .gitattributes +149 -0
- .gitignore +167 -0
- README.md +4 -5
- analytics_report_2.json +0 -0
- app.py +160 -0
- comments.json +1 -0
- features.py +49 -0
- transcriptions_report_2.json +0 -0
- utils.py +69 -0
.gitattributes
CHANGED
@@ -33,3 +33,152 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
data/audio_report_week_2 filter=lfs diff=lfs merge=lfs -text
|
37 |
+
data/audio_report_week_2/call-E8-1710527771.29304-2.ogg filter=lfs diff=lfs merge=lfs -text
|
38 |
+
data/audio_report_week_2/call-E2-1710177893.509579-2.ogg filter=lfs diff=lfs merge=lfs -text
|
39 |
+
data/audio_report_week_2/call-E2-1710340920.943425-3.ogg filter=lfs diff=lfs merge=lfs -text
|
40 |
+
data/audio_report_week_2/call-E7-1710523144.36401-2.ogg filter=lfs diff=lfs merge=lfs -text
|
41 |
+
data/audio_report_week_2/call-E7-1710437565.49909-3.ogg filter=lfs diff=lfs merge=lfs -text
|
42 |
+
data/audio_report_week_2/call-E8-1710183662.38384-2.ogg filter=lfs diff=lfs merge=lfs -text
|
43 |
+
data/audio_report_week_2/call-E8-1710185825.46253-6.ogg filter=lfs diff=lfs merge=lfs -text
|
44 |
+
data/audio_report_week_2/call-E8-1710527771.29304-7.ogg filter=lfs diff=lfs merge=lfs -text
|
45 |
+
data/audio_report_week_2/call-E4-1710698264.45468-4.ogg filter=lfs diff=lfs merge=lfs -text
|
46 |
+
data/audio_report_week_2/call-E5-1710438869.57754-4.ogg filter=lfs diff=lfs merge=lfs -text
|
47 |
+
data/audio_report_week_2/call-E5-1710710060.67408-4.ogg filter=lfs diff=lfs merge=lfs -text
|
48 |
+
data/audio_report_week_2/call-E4-1710444965.93724-2.ogg filter=lfs diff=lfs merge=lfs -text
|
49 |
+
data/audio_report_week_2/call-E5-1710267425.66258-3.ogg filter=lfs diff=lfs merge=lfs -text
|
50 |
+
data/audio_report_week_2/call-E5-1710627642.96028-3.ogg filter=lfs diff=lfs merge=lfs -text
|
51 |
+
data/audio_report_week_2/call-E6-1710450822.104775-2.ogg filter=lfs diff=lfs merge=lfs -text
|
52 |
+
data/audio_report_week_2/call-E7-1710437565.49909-4.ogg filter=lfs diff=lfs merge=lfs -text
|
53 |
+
data/audio_report_week_2/call-E2-1710536967.1484612-5.ogg filter=lfs diff=lfs merge=lfs -text
|
54 |
+
data/audio_report_week_2/call-E3-1710704168.83074-14.ogg filter=lfs diff=lfs merge=lfs -text
|
55 |
+
data/audio_report_week_2/call-E4-1710186238.69598-5.ogg filter=lfs diff=lfs merge=lfs -text
|
56 |
+
data/audio_report_week_2/call-F1-1710689135.27768-4.ogg filter=lfs diff=lfs merge=lfs -text
|
57 |
+
data/audio_report_week_2/call-E8-1710529177.33805-12.ogg filter=lfs diff=lfs merge=lfs -text
|
58 |
+
data/audio_report_week_2/call-E8-1710534214.49983-3.ogg filter=lfs diff=lfs merge=lfs -text
|
59 |
+
data/audio_report_week_2/call-E8-1710623574.6552-8.ogg filter=lfs diff=lfs merge=lfs -text
|
60 |
+
data/audio_report_week_2/call-E5-1710713584.79226-4.ogg filter=lfs diff=lfs merge=lfs -text
|
61 |
+
data/audio_report_week_2/call-F1-1710697400.53623-4.ogg filter=lfs diff=lfs merge=lfs -text
|
62 |
+
data/audio_report_week_2/call-E3-1710526496.1236515-5.ogg filter=lfs diff=lfs merge=lfs -text
|
63 |
+
data/audio_report_week_2/call-E3-1710683718.18326-7.ogg filter=lfs diff=lfs merge=lfs -text
|
64 |
+
data/audio_report_week_2/call-E4-1710438005.65549-2.ogg filter=lfs diff=lfs merge=lfs -text
|
65 |
+
data/audio_report_week_2/call-E7-1710614547.25204-5.ogg filter=lfs diff=lfs merge=lfs -text
|
66 |
+
data/audio_report_week_2/call-E1-1710434295.1153088-15.ogg filter=lfs diff=lfs merge=lfs -text
|
67 |
+
data/audio_report_week_2/call-E4-1710525016.64048-8.ogg filter=lfs diff=lfs merge=lfs -text
|
68 |
+
data/audio_report_week_2/call-E4-1710698264.45468-2.ogg filter=lfs diff=lfs merge=lfs -text
|
69 |
+
data/audio_report_week_2/call-E2-1710199476.586914-6.ogg filter=lfs diff=lfs merge=lfs -text
|
70 |
+
data/audio_report_week_2/call-E5-1710526173.61724-3.ogg filter=lfs diff=lfs merge=lfs -text
|
71 |
+
data/audio_report_week_2/call-E7-1710437565.49909-6.ogg filter=lfs diff=lfs merge=lfs -text
|
72 |
+
data/audio_report_week_2/call-E6-1710460285.143008-2.ogg filter=lfs diff=lfs merge=lfs -text
|
73 |
+
data/audio_report_week_2/call-E8-1710529177.33805-8.ogg filter=lfs diff=lfs merge=lfs -text
|
74 |
+
data/audio_report_week_2/call-F1-1710621247.10288-9.ogg filter=lfs diff=lfs merge=lfs -text
|
75 |
+
data/audio_report_week_2/call-F1-1710697400.53623-2.ogg filter=lfs diff=lfs merge=lfs -text
|
76 |
+
data/audio_report_week_2/call-E1-1710449198.1204476-5.ogg filter=lfs diff=lfs merge=lfs -text
|
77 |
+
data/audio_report_week_2/call-E2-1710538393.1488261-2.ogg filter=lfs diff=lfs merge=lfs -text
|
78 |
+
data/audio_report_week_2/call-E4-1710268829.81108-2.ogg filter=lfs diff=lfs merge=lfs -text
|
79 |
+
data/audio_report_week_2/call-E4-1710444965.93724-3.ogg filter=lfs diff=lfs merge=lfs -text
|
80 |
+
data/audio_report_week_2/call-E6-1710190961.108765-9.ogg filter=lfs diff=lfs merge=lfs -text
|
81 |
+
data/audio_report_week_2/call-E2-1710451379.1263442-2.ogg filter=lfs diff=lfs merge=lfs -text
|
82 |
+
data/audio_report_week_2/call-E2-1710628401.149630-2.ogg filter=lfs diff=lfs merge=lfs -text
|
83 |
+
data/audio_report_week_2/call-E3-1710363517.795016-2.ogg filter=lfs diff=lfs merge=lfs -text
|
84 |
+
data/audio_report_week_2/call-E4-1710186238.69598-3.ogg filter=lfs diff=lfs merge=lfs -text
|
85 |
+
data/audio_report_week_2/call-E5-1710710060.67408-2.ogg filter=lfs diff=lfs merge=lfs -text
|
86 |
+
data/audio_report_week_2/call-E9-1710542869.60504-5.ogg filter=lfs diff=lfs merge=lfs -text
|
87 |
+
data/audio_report_week_2/call-E2-1710435813.1204823-6.ogg filter=lfs diff=lfs merge=lfs -text
|
88 |
+
data/audio_report_week_2/call-E6-1710361091.87619-2.ogg filter=lfs diff=lfs merge=lfs -text
|
89 |
+
data/audio_report_week_2/call-E7-1710353530.44142-2.ogg filter=lfs diff=lfs merge=lfs -text
|
90 |
+
data/audio_report_week_2/call-E9-1710278087.94175-2.ogg filter=lfs diff=lfs merge=lfs -text
|
91 |
+
data/audio_report_week_2/call-F1-1710281792.124517-2.ogg filter=lfs diff=lfs merge=lfs -text
|
92 |
+
data/audio_report_week_2/call-E1-1710627474.157833-4.ogg filter=lfs diff=lfs merge=lfs -text
|
93 |
+
data/audio_report_week_2/call-E2-1710199476.586914-3.ogg filter=lfs diff=lfs merge=lfs -text
|
94 |
+
data/audio_report_week_2/call-E6-1710460285.143008-4.ogg filter=lfs diff=lfs merge=lfs -text
|
95 |
+
data/audio_report_week_2/call-E6-1710448387.95147-8.ogg filter=lfs diff=lfs merge=lfs -text
|
96 |
+
data/audio_report_week_2/call-F1-1710703496.73688-3.ogg filter=lfs diff=lfs merge=lfs -text
|
97 |
+
data/audio_report_week_2/call-E3-1710683718.18326-5.ogg filter=lfs diff=lfs merge=lfs -text
|
98 |
+
data/audio_report_week_2/call-E4-1710535213.96124-3.ogg filter=lfs diff=lfs merge=lfs -text
|
99 |
+
data/audio_report_week_2/call-E5-1710526173.61724-2.ogg filter=lfs diff=lfs merge=lfs -text
|
100 |
+
data/audio_report_week_2/call-E1-1710627474.157833-2.ogg filter=lfs diff=lfs merge=lfs -text
|
101 |
+
data/audio_report_week_2/call-E8-1710531548.41758-8.ogg filter=lfs diff=lfs merge=lfs -text
|
102 |
+
data/audio_report_week_2/call-F1-1710621247.10288-18.ogg filter=lfs diff=lfs merge=lfs -text
|
103 |
+
data/audio_report_week_2/call-E5-1710713584.79226-2.ogg filter=lfs diff=lfs merge=lfs -text
|
104 |
+
data/audio_report_week_2/call-E6-1710442116.69601-2.ogg filter=lfs diff=lfs merge=lfs -text
|
105 |
+
data/audio_report_week_2/call-E9-1710186297.26791-5.ogg filter=lfs diff=lfs merge=lfs -text
|
106 |
+
data/audio_report_week_2/call-E1-1710351265.942438-3.ogg filter=lfs diff=lfs merge=lfs -text
|
107 |
+
data/audio_report_week_2/call-E2-1710628401.149630-4.ogg filter=lfs diff=lfs merge=lfs -text
|
108 |
+
data/audio_report_week_2/call-E4-1710718732.21931-3.ogg filter=lfs diff=lfs merge=lfs -text
|
109 |
+
data/audio_report_week_2/call-E7-1710457712.131994-7.ogg filter=lfs diff=lfs merge=lfs -text
|
110 |
+
data/audio_report_week_2/call-E8-1710185825.46253-3.ogg filter=lfs diff=lfs merge=lfs -text
|
111 |
+
data/audio_report_week_2/call-E2-1710436816.1208125-3.ogg filter=lfs diff=lfs merge=lfs -text
|
112 |
+
data/audio_report_week_2/call-E3-1710704168.83074-12.ogg filter=lfs diff=lfs merge=lfs -text
|
113 |
+
data/audio_report_week_2/call-E7-1710457712.131994-4.ogg filter=lfs diff=lfs merge=lfs -text
|
114 |
+
data/audio_report_week_2/call-E2-1710610729.100679-8.ogg filter=lfs diff=lfs merge=lfs -text
|
115 |
+
data/audio_report_week_2/call-E4-1710718732.21931-2.ogg filter=lfs diff=lfs merge=lfs -text
|
116 |
+
data/audio_report_week_2/call-F1-1710356654.72948-2.ogg filter=lfs diff=lfs merge=lfs -text
|
117 |
+
data/audio_report_week_2/call-F1-1710702311.69983-3.ogg filter=lfs diff=lfs merge=lfs -text
|
118 |
+
data/audio_report_week_2/call-E1-1710542723.1436580-3.ogg filter=lfs diff=lfs merge=lfs -text
|
119 |
+
data/audio_report_week_2/call-E5-1710618502.69849-8.ogg filter=lfs diff=lfs merge=lfs -text
|
120 |
+
data/audio_report_week_2/call-E7-1710457712.131994-2.ogg filter=lfs diff=lfs merge=lfs -text
|
121 |
+
data/audio_report_week_2/call-E9-1710192068.47796-2.ogg filter=lfs diff=lfs merge=lfs -text
|
122 |
+
data/audio_report_week_2/call-F1-1710621247.10288-12.ogg filter=lfs diff=lfs merge=lfs -text
|
123 |
+
data/audio_report_week_2/call-E5-1710695633.22788-14.ogg filter=lfs diff=lfs merge=lfs -text
|
124 |
+
data/audio_report_week_2/call-E8-1710187684.52685-5.ogg filter=lfs diff=lfs merge=lfs -text
|
125 |
+
data/audio_report_week_2/call-E8-1710530316.37480-5.ogg filter=lfs diff=lfs merge=lfs -text
|
126 |
+
data/audio_report_week_2/call-E5-1710710060.67408-3.ogg filter=lfs diff=lfs merge=lfs -text
|
127 |
+
data/audio_report_week_2/call-F1-1710177154.57645-3.ogg filter=lfs diff=lfs merge=lfs -text
|
128 |
+
data/audio_report_week_2/call-E3-1710315876.657796-2.ogg filter=lfs diff=lfs merge=lfs -text
|
129 |
+
data/audio_report_week_2/call-E3-1710704168.83074-8.ogg filter=lfs diff=lfs merge=lfs -text
|
130 |
+
data/audio_report_week_2/call-E4-1710522655.56217-5.ogg filter=lfs diff=lfs merge=lfs -text
|
131 |
+
data/audio_report_week_2/call-E5-1710438869.57754-2.ogg filter=lfs diff=lfs merge=lfs -text
|
132 |
+
data/audio_report_week_2/call-E5-1710713584.79226-3.ogg filter=lfs diff=lfs merge=lfs -text
|
133 |
+
data/audio_report_week_2/call-E8-1710187684.52685-8.ogg filter=lfs diff=lfs merge=lfs -text
|
134 |
+
data/audio_report_week_2/call-E9-1710542869.60504-8.ogg filter=lfs diff=lfs merge=lfs -text
|
135 |
+
data/audio_report_week_2/call-F1-1710189924.104241-7.ogg filter=lfs diff=lfs merge=lfs -text
|
136 |
+
data/audio_report_week_2/call-E2-1710199476.586914-7.ogg filter=lfs diff=lfs merge=lfs -text
|
137 |
+
data/audio_report_week_2/call-E3-1710526496.1236515-7.ogg filter=lfs diff=lfs merge=lfs -text
|
138 |
+
data/audio_report_week_2/call-E4-1710444965.93724-4.ogg filter=lfs diff=lfs merge=lfs -text
|
139 |
+
data/audio_report_week_2/call-E3-1710704168.83074-16.ogg filter=lfs diff=lfs merge=lfs -text
|
140 |
+
data/audio_report_week_2/call-E4-1710451724.121780-2.ogg filter=lfs diff=lfs merge=lfs -text
|
141 |
+
data/audio_report_week_2/call-F1-1710697400.53623-3.ogg filter=lfs diff=lfs merge=lfs -text
|
142 |
+
data/audio_report_week_2/call-F1-1710703496.73688-6.ogg filter=lfs diff=lfs merge=lfs -text
|
143 |
+
data/audio_report_week_2/call-E1-1710449198.1204476-3.ogg filter=lfs diff=lfs merge=lfs -text
|
144 |
+
data/audio_report_week_2/call-E3-1710704168.83074-10.ogg filter=lfs diff=lfs merge=lfs -text
|
145 |
+
data/audio_report_week_2/call-F1-1710702311.69983-5.ogg filter=lfs diff=lfs merge=lfs -text
|
146 |
+
data/audio_report_week_2/call-E4-1710522655.56217-7.ogg filter=lfs diff=lfs merge=lfs -text
|
147 |
+
data/audio_report_week_2/call-E4-1710605994.6008-4.ogg filter=lfs diff=lfs merge=lfs -text
|
148 |
+
data/audio_report_week_2/call-E6-1710622553.70270-8.ogg filter=lfs diff=lfs merge=lfs -text
|
149 |
+
data/audio_report_week_2/call-E7-1710437565.49909-2.ogg filter=lfs diff=lfs merge=lfs -text
|
150 |
+
data/audio_report_week_2/call-E7-1710524229.39593-2.ogg filter=lfs diff=lfs merge=lfs -text
|
151 |
+
data/audio_report_week_2/call-E3-1710542640.1286618-2.ogg filter=lfs diff=lfs merge=lfs -text
|
152 |
+
data/audio_report_week_2/call-E3-1710704168.83074-3.ogg filter=lfs diff=lfs merge=lfs -text
|
153 |
+
data/audio_report_week_2/call-E4-1710367989.89196-2.ogg filter=lfs diff=lfs merge=lfs -text
|
154 |
+
data/audio_report_week_2/call-E8-1710530316.37480-7.ogg filter=lfs diff=lfs merge=lfs -text
|
155 |
+
data/audio_report_week_2/call-E9-1710542869.60504-7.ogg filter=lfs diff=lfs merge=lfs -text
|
156 |
+
data/audio_report_week_2/call-E2-1710435813.1204823-8.ogg filter=lfs diff=lfs merge=lfs -text
|
157 |
+
data/audio_report_week_2/call-E5-1710695633.22788-8.ogg filter=lfs diff=lfs merge=lfs -text
|
158 |
+
data/audio_report_week_2/call-E9-1710186297.26791-8.ogg filter=lfs diff=lfs merge=lfs -text
|
159 |
+
data/audio_report_week_2/call-E2-1710177893.509579-3.ogg filter=lfs diff=lfs merge=lfs -text
|
160 |
+
data/audio_report_week_2/call-E2-1710264716.741930-3.ogg filter=lfs diff=lfs merge=lfs -text
|
161 |
+
data/audio_report_week_2/call-E4-1710525016.64048-6.ogg filter=lfs diff=lfs merge=lfs -text
|
162 |
+
data/audio_report_week_2/call-E7-1710614547.25204-3.ogg filter=lfs diff=lfs merge=lfs -text
|
163 |
+
data/audio_report_week_2/call-F1-1710689135.27768-2.ogg filter=lfs diff=lfs merge=lfs -text
|
164 |
+
data/audio_report_week_2/call-F1-1710189924.104241-5.ogg filter=lfs diff=lfs merge=lfs -text
|
165 |
+
data/audio_report_week_2/call-E4-1710698264.45468-3.ogg filter=lfs diff=lfs merge=lfs -text
|
166 |
+
data/audio_report_week_2/call-E4-1710718732.21931-4.ogg filter=lfs diff=lfs merge=lfs -text
|
167 |
+
data/audio_report_week_2/call-E5-1710438869.57754-3.ogg filter=lfs diff=lfs merge=lfs -text
|
168 |
+
data/audio_report_week_2/call-F1-1710621247.10288-14.ogg filter=lfs diff=lfs merge=lfs -text
|
169 |
+
data/audio_report_week_2/call-F1-1710703496.73688-7.ogg filter=lfs diff=lfs merge=lfs -text
|
170 |
+
data/audio_report_week_2/call-E1-1710608878.108519-8.ogg filter=lfs diff=lfs merge=lfs -text
|
171 |
+
data/audio_report_week_2/call-E5-1710695633.22788-12.ogg filter=lfs diff=lfs merge=lfs -text
|
172 |
+
data/audio_report_week_2/call-E7-1710621874.48429-10.ogg filter=lfs diff=lfs merge=lfs -text
|
173 |
+
data/audio_report_week_2/call-E8-1710536720.58055-3.ogg filter=lfs diff=lfs merge=lfs -text
|
174 |
+
data/audio_report_week_2/call-E4-1710438005.65549-4.ogg filter=lfs diff=lfs merge=lfs -text
|
175 |
+
data/audio_report_week_2/call-E4-1710605994.6008-6.ogg filter=lfs diff=lfs merge=lfs -text
|
176 |
+
data/audio_report_week_2/call-E8-1710527771.29304-4.ogg filter=lfs diff=lfs merge=lfs -text
|
177 |
+
data/audio_report_week_2/call-F1-1710532374.61308-3.ogg filter=lfs diff=lfs merge=lfs -text
|
178 |
+
data/audio_report_week_2/call-E2-1710536967.1484612-3.ogg filter=lfs diff=lfs merge=lfs -text
|
179 |
+
data/audio_report_week_2/call-E3-1710704168.83074-5.ogg filter=lfs diff=lfs merge=lfs -text
|
180 |
+
data/audio_report_week_2/call-E9-1710444018.50585-2.ogg filter=lfs diff=lfs merge=lfs -text
|
181 |
+
data/audio_report_week_2/call-F1-1710689135.27768-3.ogg filter=lfs diff=lfs merge=lfs -text
|
182 |
+
data/audio_report_week_2/call-E2-1710436816.1208125-2.ogg filter=lfs diff=lfs merge=lfs -text
|
183 |
+
data/audio_report_week_2/call-E3-1710363329.794367-2.ogg filter=lfs diff=lfs merge=lfs -text
|
184 |
+
data/audio_report_week_2/call-E8-1710185825.46253-7.ogg filter=lfs diff=lfs merge=lfs -text
|
.gitignore
ADDED
@@ -0,0 +1,167 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.run
|
2 |
+
.redis
|
3 |
+
|
4 |
+
# Byte-compiled / optimized / DLL files
|
5 |
+
__pycache__/
|
6 |
+
*.py[cod]
|
7 |
+
*$py.class
|
8 |
+
|
9 |
+
# C extensions
|
10 |
+
*.so
|
11 |
+
|
12 |
+
# Distribution / packaging
|
13 |
+
.Python
|
14 |
+
build/
|
15 |
+
develop-eggs/
|
16 |
+
dist/
|
17 |
+
downloads/
|
18 |
+
eggs/
|
19 |
+
.eggs/
|
20 |
+
lib/
|
21 |
+
lib64/
|
22 |
+
parts/
|
23 |
+
sdist/
|
24 |
+
var/
|
25 |
+
wheels/
|
26 |
+
share/python-wheels/
|
27 |
+
*.egg-info/
|
28 |
+
.installed.cfg
|
29 |
+
*.egg
|
30 |
+
MANIFEST
|
31 |
+
|
32 |
+
# PyInstaller
|
33 |
+
# Usually these files are written by a python script from a template
|
34 |
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
35 |
+
*.manifest
|
36 |
+
*.spec
|
37 |
+
|
38 |
+
# Installer logs
|
39 |
+
pip-log.txt
|
40 |
+
pip-delete-this-directory.txt
|
41 |
+
|
42 |
+
# Unit test / coverage reports
|
43 |
+
htmlcov/
|
44 |
+
.tox/
|
45 |
+
.nox/
|
46 |
+
.coverage
|
47 |
+
.coverage.*
|
48 |
+
.cache
|
49 |
+
nosetests.xml
|
50 |
+
coverage.xml
|
51 |
+
*.cover
|
52 |
+
*.py,cover
|
53 |
+
.hypothesis/
|
54 |
+
.pytest_cache/
|
55 |
+
cover/
|
56 |
+
|
57 |
+
# Translations
|
58 |
+
*.mo
|
59 |
+
*.pot
|
60 |
+
|
61 |
+
# Django stuff:
|
62 |
+
*.log
|
63 |
+
local_settings.py
|
64 |
+
db.sqlite3
|
65 |
+
db.sqlite3-journal
|
66 |
+
|
67 |
+
# Flask stuff:
|
68 |
+
instance/
|
69 |
+
.webassets-cache
|
70 |
+
|
71 |
+
# Scrapy stuff:
|
72 |
+
.scrapy
|
73 |
+
|
74 |
+
# Sphinx documentation
|
75 |
+
docs/_build/
|
76 |
+
|
77 |
+
# PyBuilder
|
78 |
+
.pybuilder/
|
79 |
+
target/
|
80 |
+
|
81 |
+
# Jupyter Notebook
|
82 |
+
.ipynb_checkpoints
|
83 |
+
|
84 |
+
# IPython
|
85 |
+
profile_default/
|
86 |
+
ipython_config.py
|
87 |
+
|
88 |
+
# pyenv
|
89 |
+
# For a library or package, you might want to ignore these files since the code is
|
90 |
+
# intended to run in multiple environments; otherwise, check them in:
|
91 |
+
.python-version
|
92 |
+
|
93 |
+
# pipenv
|
94 |
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
95 |
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
96 |
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
97 |
+
# install all needed dependencies.
|
98 |
+
Pipfile.lock
|
99 |
+
|
100 |
+
# poetry
|
101 |
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
102 |
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
103 |
+
# commonly ignored for libraries.
|
104 |
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
105 |
+
poetry.lock
|
106 |
+
|
107 |
+
# pdm
|
108 |
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
109 |
+
pdm.lock
|
110 |
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
111 |
+
# in version control.
|
112 |
+
# https://pdm.fming.dev/#use-with-ide
|
113 |
+
.pdm.toml
|
114 |
+
|
115 |
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
116 |
+
__pypackages__/
|
117 |
+
|
118 |
+
# Celery stuff
|
119 |
+
celerybeat-schedule
|
120 |
+
celerybeat.pid
|
121 |
+
|
122 |
+
# SageMath parsed files
|
123 |
+
*.sage.py
|
124 |
+
|
125 |
+
# Environments
|
126 |
+
.env
|
127 |
+
.venv
|
128 |
+
env/
|
129 |
+
venv/
|
130 |
+
ENV/
|
131 |
+
env.bak/
|
132 |
+
venv.bak/
|
133 |
+
|
134 |
+
# Spyder project settings
|
135 |
+
.spyderproject
|
136 |
+
.spyproject
|
137 |
+
|
138 |
+
# Rope project settings
|
139 |
+
.ropeproject
|
140 |
+
|
141 |
+
# mkdocs documentation
|
142 |
+
/site
|
143 |
+
|
144 |
+
# mypy
|
145 |
+
.mypy_cache/
|
146 |
+
.dmypy.json
|
147 |
+
dmypy.json
|
148 |
+
|
149 |
+
# Pyre type checker
|
150 |
+
.pyre/
|
151 |
+
|
152 |
+
# pytype static type analyzer
|
153 |
+
.pytype/
|
154 |
+
|
155 |
+
# Cython debug symbols
|
156 |
+
cython_debug/
|
157 |
+
|
158 |
+
# PyCharm
|
159 |
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
160 |
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
161 |
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
162 |
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
163 |
+
.idea/
|
164 |
+
|
165 |
+
|
166 |
+
.DS_Store
|
167 |
+
|
README.md
CHANGED
@@ -1,13 +1,12 @@
|
|
1 |
---
|
2 |
title: Report Week 2
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
-
colorTo:
|
6 |
sdk: streamlit
|
7 |
-
sdk_version: 1.
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
-
license: mit
|
11 |
---
|
12 |
|
13 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
1 |
---
|
2 |
title: Report Week 2
|
3 |
+
emoji: 👁
|
4 |
+
colorFrom: gray
|
5 |
+
colorTo: gray
|
6 |
sdk: streamlit
|
7 |
+
sdk_version: 1.29.0
|
8 |
app_file: app.py
|
9 |
pinned: false
|
|
|
10 |
---
|
11 |
|
12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
analytics_report_2.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
app.py
ADDED
@@ -0,0 +1,160 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from __future__ import annotations
|
2 |
+
from datetime import datetime
|
3 |
+
import pandas as pd
|
4 |
+
import json
|
5 |
+
from pathlib import Path
|
6 |
+
|
7 |
+
from huggingface_hub import hf_hub_download, HfApi
|
8 |
+
import streamlit as st
|
9 |
+
|
10 |
+
from features import FEATURES
|
11 |
+
from utils import check_password, process_olivia_data
|
12 |
+
|
13 |
+
|
14 |
+
REPO_URL = "https://huggingface.co/datasets/trevolution/conversation-analytics-comments"
|
15 |
+
api = HfApi()
|
16 |
+
|
17 |
+
|
18 |
+
features_to_show = ['C: Missed Expectation : No Call Back/Follow Up',
|
19 |
+
'C: Missed Expectation - Not Informed',
|
20 |
+
'C: Missed Promises',
|
21 |
+
'C: Repeat Contact - General/Other',
|
22 |
+
'C: Repeat Contact - Previous Calls',
|
23 |
+
'C: Repeat Information',
|
24 |
+
'C: Agent Hanged Up',
|
25 |
+
'C: Disputing Charge / Chargeback',
|
26 |
+
'A: Transfer',
|
27 |
+
'A: Transfer offer',
|
28 |
+
'C: Channel Switch - Website',
|
29 |
+
'C: Objection - Competitor - Switch',
|
30 |
+
'C: Channel Switch - Webchat',
|
31 |
+
'Escalation: External - Attorney General',
|
32 |
+
'Escalation: External - BBB',
|
33 |
+
'Escalation: External - Legal',
|
34 |
+
'Escalation: Internal - Complaint',
|
35 |
+
'Escalation: Internal - Corporate',
|
36 |
+
'Escalation: Internal - Do Not Contact/Remove from list',
|
37 |
+
'Escalation: Internal - Supervisor']
|
38 |
+
|
39 |
+
|
40 |
+
style = (
|
41 |
+
'border: 1px solid #ccc; '
|
42 |
+
'padding: 10px; '
|
43 |
+
'border-radius: 5px; '
|
44 |
+
'max-height: 500px; ' # Set your desired maximum height
|
45 |
+
'overflow: auto;' # Enable vertical scrollbar if content exceeds max height
|
46 |
+
)
|
47 |
+
|
48 |
+
|
49 |
+
def get_div(input):
|
50 |
+
return f'<div style="{style}"><p>{input}</p></div>'
|
51 |
+
|
52 |
+
|
53 |
+
def main():
|
54 |
+
|
55 |
+
if not check_password():
|
56 |
+
st.stop()
|
57 |
+
|
58 |
+
comments_path = hf_hub_download(
|
59 |
+
repo_id='trevolution/conversation-analytics-comments',
|
60 |
+
repo_type='dataset',
|
61 |
+
filename='comments_report_2.json',
|
62 |
+
token=st.secrets['WRITE_TOKEN'],
|
63 |
+
)
|
64 |
+
with open(comments_path, 'r') as f:
|
65 |
+
comments = json.load(f)
|
66 |
+
with open('transcriptions_report_2.json', 'r') as f:
|
67 |
+
transcriptions = json.load(f)
|
68 |
+
with open('analytics_report_2.json', 'r') as f:
|
69 |
+
analytics = json.load(f)
|
70 |
+
call_ids = [_['metadata']['call_id'] for _ in transcriptions]
|
71 |
+
call_ids = list(set(call_ids))
|
72 |
+
|
73 |
+
st.title('Olivia - Agent - Conversation Analytics')
|
74 |
+
call_id = st.selectbox(
|
75 |
+
'Call IDs:',
|
76 |
+
call_ids,
|
77 |
+
format_func=lambda call_id: f'{call_ids.index(call_id) + 1}: {call_id}'
|
78 |
+
)
|
79 |
+
|
80 |
+
if not st.session_state.get('selectbox'):
|
81 |
+
st.session_state['selectbox'] = call_id
|
82 |
+
else:
|
83 |
+
if call_id != st.session_state['selectbox']:
|
84 |
+
st.session_state['analyze_button'] = False
|
85 |
+
st.session_state['selectbox'] = call_id
|
86 |
+
|
87 |
+
transcription = [_ for _ in transcriptions if _['metadata']['call_id'] == call_id][0]
|
88 |
+
try:
|
89 |
+
analytics = [json.loads(_['analytics']) for _ in analytics if call_id == json.loads(_['metadata'])['call_id']][0]
|
90 |
+
analytics = analytics['analytics']
|
91 |
+
analytics = [f for f in analytics if f['name'] in features_to_show]
|
92 |
+
except:
|
93 |
+
analytics = None
|
94 |
+
|
95 |
+
st.audio(f'data/audio_report_week_2/{call_id}.ogg', format='audio/ogg')
|
96 |
+
|
97 |
+
analyze_button = st.button("Get Conversation Analytics")
|
98 |
+
if not st.session_state.get('analyze_button'):
|
99 |
+
st.session_state['analyze_button'] = analyze_button
|
100 |
+
|
101 |
+
if st.session_state['selectbox'] and st.session_state['analyze_button']:
|
102 |
+
with st.spinner('Loading analytics...'):
|
103 |
+
st.text('Analytics')
|
104 |
+
readable_analytics = ''
|
105 |
+
for i, feature in enumerate(analytics):
|
106 |
+
readable_analytics += f"{i+1}. {feature['name']}: {feature['response']}. Quotation: {feature['quotation']}\n\n\n"
|
107 |
+
st.markdown(get_div(readable_analytics), unsafe_allow_html=True)
|
108 |
+
|
109 |
+
conversation = process_olivia_data(transcription['transcription'])
|
110 |
+
st.text('Conversation (Olivia Speech-to-Text):')
|
111 |
+
st.markdown(get_div(conversation['text']), unsafe_allow_html=True)
|
112 |
+
|
113 |
+
if "saved_comments" not in st.session_state:
|
114 |
+
st.session_state['saved_comments'] = ""
|
115 |
+
|
116 |
+
user_comments = st.text_area(f"Comments on {call_id}", key='user_comments', height=350)
|
117 |
+
|
118 |
+
def submit():
|
119 |
+
st.session_state['saved_comments'] = st.session_state['user_comments']
|
120 |
+
st.session_state['user_comments'] = ""
|
121 |
+
|
122 |
+
button = st.button("Save comments", on_click=submit)
|
123 |
+
if button and st.session_state['saved_comments']:
|
124 |
+
|
125 |
+
if call_id in comments:
|
126 |
+
comments[call_id].append(
|
127 |
+
{
|
128 |
+
'timestamp': datetime.now().strftime("%Y-%m-%d %H:%M:%S"),
|
129 |
+
'text': st.session_state['saved_comments']
|
130 |
+
}
|
131 |
+
)
|
132 |
+
else:
|
133 |
+
comments[call_id] = [
|
134 |
+
{
|
135 |
+
'timestamp': datetime.now().strftime("%Y-%m-%d %H:%M:%S"),
|
136 |
+
'text': st.session_state['saved_comments']
|
137 |
+
}
|
138 |
+
]
|
139 |
+
|
140 |
+
api.upload_file(
|
141 |
+
path_or_fileobj=json.dumps(comments).encode('utf-8'),
|
142 |
+
path_in_repo="comments_report_2.json",
|
143 |
+
repo_id="trevolution/conversation-analytics-comments",
|
144 |
+
repo_type="dataset",
|
145 |
+
token=st.secrets['WRITE_TOKEN'],
|
146 |
+
commit_message=f"{call_id}_{datetime.now().strftime('%Y-%m-%d')}"
|
147 |
+
)
|
148 |
+
st.success("Saved")
|
149 |
+
|
150 |
+
if comments.get(call_id):
|
151 |
+
value = ''
|
152 |
+
for comment in comments.get(call_id):
|
153 |
+
value += f"{comment['timestamp']}: {comment['text']}\n"
|
154 |
+
st.text_area(label='Comments:', value=value, disabled=True, height=350)
|
155 |
+
else:
|
156 |
+
st.text_area(label='Comments:', value="No comments exist at the moment", disabled=True)
|
157 |
+
|
158 |
+
|
159 |
+
if __name__ == "__main__":
|
160 |
+
main()
|
comments.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{}
|
features.py
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FEATURES = {
|
2 |
+
'The Agent introduced themselves properly': "Introduction by Agent",
|
3 |
+
'The Agent greeted the Customer': "Greeting",
|
4 |
+
'The Agent mentioned the company name': "Company Name",
|
5 |
+
'The Agent talked about sending Introduction letter to the customer': "Introduction Letter",
|
6 |
+
'The Agent asked the Customer about their Departure and Destination for the Travel Plan': "Departure and Destination",
|
7 |
+
'The Agent asked about Travel Dates from the Customer': "Travel Dates",
|
8 |
+
'The Agent offer car rental services or ask to inquire about car needs from the passenger': "Q: Car Rental",
|
9 |
+
'The Agent offer car rental services or ask to inquire about car needs from the passenger.': "Q: Car Rental",
|
10 |
+
'The Agent offered car rental services or ask to inquire about car needs from the passenger': "Q: Car Rental",
|
11 |
+
'The Agent offered car rental services or asked to inquire about car needs from the passenger': "Q: Car Rental",
|
12 |
+
'The Agent offered car rental services or asked to inquire about car needs from the passenger.': "Q: Car Rental",
|
13 |
+
'The Customer was interested in car rental service': "A: Car Rental",
|
14 |
+
'The Agent offered Hotel Accommodation or services related to Hotel or asked to inquire about Hotel needs from the Customer': "Q: Hotel Accomodation",
|
15 |
+
'The Agent offered Hotel Accommodation or services related to Hotel or asked to enquire about Hotel needs from the Customer': "Q: Hotel Accomodation",
|
16 |
+
'The Customer was interested in Hotel Accommodation service.': "A: Hotel Accomodation",
|
17 |
+
'The Customer complained that they never received a call back or follow up that was promised by the Agent': "Missed Expectation : No Call Back/Follow Up",
|
18 |
+
"The Customer complained that the information that they requested wasn't shared as promised.": "Missed Expectation - Not Informed",
|
19 |
+
"The Customer complained that the information that they requested wasn't shared as was promised.": "Missed Expectation - Not Informed",
|
20 |
+
"The Customer complained that the information they requested wasn't shared as was promised.": "Missed Expectation - Not Informed",
|
21 |
+
'The Customer complained that they did not receive what was promised by the Agent.': "Missed Promises",
|
22 |
+
"The Customer complained that they wrote an email to the company regarding their issue and it wasn't resolved.": "Repeat Contact - General/Other",
|
23 |
+
"The Customer complained that they called the company regarding their issue and it wasn't resolved": "Repeat Contact - Previous Calls",
|
24 |
+
"The Customer complained that they have been repeating the same information to different agents or to the agent that is assisting during the call.": "Repeat Information",
|
25 |
+
'The Customer was interested in Hotel Accommodation service': "A: Hotel Accomodation",
|
26 |
+
'The Customer complained that they never received a call back or follow up that was promised by the Agent.': "Missed Expectation : No Call Back/Follow Up",
|
27 |
+
"The Customer complained that the information that they requested wasn't shared as promised": "Missed Expectation - Not Informed",
|
28 |
+
"The Customer complained that the information that they requested wasn't shared as was promised": "Missed Expectation - Not Informed",
|
29 |
+
"The Customer complained that the information they requested wasn't shared as was promised": "Missed Expectation - Not Informed",
|
30 |
+
'The Customer complained that they did not receive what was promised by the Agent': "Missed Promises",
|
31 |
+
"The Customer complained that they wrote an email to the company regarding their issue and it wasn't resolved": "Repeat Contact - General/Other",
|
32 |
+
"The Customer complained that they called the company regarding their issue and it wasn't resolved.": "Repeat Contact - Previous Calls",
|
33 |
+
"The Customer complained that they have been repeating the same information to different agents or to the agent that is assisting during the call": "Repeat Information",
|
34 |
+
"The Agent hung up on the customer or the customer complained about the previous agent hanging up": "Agent Hanged Up",
|
35 |
+
"The Customer threatened chargebacks or expressed intent to dispute charges": "Disputing Charge / Chargeback",
|
36 |
+
"The Agent advised the Customer that the call will be transferred to a different agent or department or the Customer requested call transfer": "Transfer",
|
37 |
+
"The Agent offered to transfer a customer to a different agent or department": "Transfer offer",
|
38 |
+
"The Customer complained that they were not able to resolve their issue by using our company's website": "Channel Switch - Website",
|
39 |
+
"The Customer stated that they will not use the company's services and will be switch to the competitors or mentioned that the competitors are providing better services": "Objection - Competitor - Switch",
|
40 |
+
"The Customer mentioned that they had been using the webchat": "Channel Switch - Webchat",
|
41 |
+
"The Customer threatened that they will contact the attorney or the Customer mentioned Attorney General": "Escalation: External - Attorney General",
|
42 |
+
"The Customer threatened that they will be writing a BBB complaint": "Escalation: External - BBB",
|
43 |
+
"The Customer threatened with legal actions or mentioned legal escalation": "Escalation: External - Legal",
|
44 |
+
"The Customer stated that they will not use the company's services and will switch to the competitors or mentioned that the competitors are providing better services": "Objection - Competitor - Switch",
|
45 |
+
"The Customer stated that they had a complaint about the company": "Escalation: Internal - Complaint",
|
46 |
+
"The Customer wanted to complain at the corporate level or mentioned escalation": "Escalation: Internal - Corporate",
|
47 |
+
"The Customer requested for their information to be removed off of the company's call/sell/mailing list": "Escalation: Internal - Do Not Contact/Remove from list",
|
48 |
+
"The Customer requested to speak to a manager or a supervisor": "Escalation: Internal - Supervisor"
|
49 |
+
}
|
transcriptions_report_2.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
utils.py
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from typing import Dict
|
2 |
+
|
3 |
+
import hmac
|
4 |
+
import streamlit as st
|
5 |
+
|
6 |
+
|
7 |
+
def process_olivia_data(transcription: dict) -> str:
|
8 |
+
phrases = transcription['phrases']
|
9 |
+
conversation = ''
|
10 |
+
for phrase in phrases:
|
11 |
+
conversation += 'Agent: ' if phrase['channel'] == 0 else 'Customer: '
|
12 |
+
parsed_phrase = ''.join(word['text'] for word in phrase['words'])
|
13 |
+
conversation += parsed_phrase
|
14 |
+
conversation += '\n\n\n'
|
15 |
+
return {'text': conversation}
|
16 |
+
|
17 |
+
def process_tethr_data(data: Dict) -> Dict:
|
18 |
+
extracted_words = []
|
19 |
+
participants = data.get("participants", [])
|
20 |
+
for participant in participants:
|
21 |
+
participant_type = 'Agent' if 'Agent' in participant.get("refType", "") else 'Customer'
|
22 |
+
utterances = participant.get("utterances", [])
|
23 |
+
for utterance in utterances:
|
24 |
+
words = utterance.get("words") # by words, not utterances since messed up
|
25 |
+
for word in words:
|
26 |
+
word_obj = {
|
27 |
+
'participant': participant_type,
|
28 |
+
'word': word.get('content', ''),
|
29 |
+
'start': word.get('startMs', None),
|
30 |
+
'end': word.get('endMs', None)
|
31 |
+
}
|
32 |
+
extracted_words.append(word_obj)
|
33 |
+
extracted_words.sort(key=lambda x: x['start']) # Sort by start time
|
34 |
+
|
35 |
+
conversation = ''
|
36 |
+
participant = None
|
37 |
+
|
38 |
+
for word in extracted_words:
|
39 |
+
if word['participant'] != participant:
|
40 |
+
if participant:
|
41 |
+
conversation += '\n\n'
|
42 |
+
participant = word['participant']
|
43 |
+
conversation += f'{participant}: '
|
44 |
+
conversation += f"{word['word']} "
|
45 |
+
return {'id': data['callId'], 'text': conversation}
|
46 |
+
|
47 |
+
|
48 |
+
def check_password():
|
49 |
+
"""Returns `True` if the user had the correct password."""
|
50 |
+
|
51 |
+
def password_entered():
|
52 |
+
"""Checks whether a password entered by the user is correct."""
|
53 |
+
if hmac.compare_digest(st.session_state["password"], st.secrets["PASSWORD"]):
|
54 |
+
st.session_state["password_correct"] = True
|
55 |
+
del st.session_state["password"] # Don't store the password.
|
56 |
+
else:
|
57 |
+
st.session_state["password_correct"] = False
|
58 |
+
|
59 |
+
# Return True if the passward is validated.
|
60 |
+
if st.session_state.get("password_correct", False):
|
61 |
+
return True
|
62 |
+
|
63 |
+
# Show input for password.
|
64 |
+
st.text_input(
|
65 |
+
"Password", type="password", on_change=password_entered, key="password"
|
66 |
+
)
|
67 |
+
if "password_correct" in st.session_state:
|
68 |
+
st.error("Incorrect password")
|
69 |
+
return False
|