czyoung commited on
Commit
3505359
·
verified ·
1 Parent(s): d218fde

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -154,19 +154,19 @@ def analyze(inFileName):
154
  valueList = [0 for i in range(len(nameList))]
155
  extraValues = []
156
 
157
- for sp in currResults["speakers"].keys():
158
  foundSp = False
159
  for i, categoryName in enumerate(nameList):
160
  if sp in categorySelections[i]:
161
  #st.info(categoryName)
162
- valueList[i] += sumTimes(currResults["speakers"][sp])
163
  foundSp = True
164
  break
165
  if foundSp:
166
  continue
167
  else:
168
  extraNames.append(sp)
169
- extraValues.append(sumTimes(currResults["speakers"][sp]))
170
  df4_dict = {
171
  "values": valueList+extraValues,
172
  "names": nameList+extraNames,
 
154
  valueList = [0 for i in range(len(nameList))]
155
  extraValues = []
156
 
157
+ for sp in speakerNames:
158
  foundSp = False
159
  for i, categoryName in enumerate(nameList):
160
  if sp in categorySelections[i]:
161
  #st.info(categoryName)
162
+ valueList[i] += sumTimes(currAnnotation.subset([sp]))
163
  foundSp = True
164
  break
165
  if foundSp:
166
  continue
167
  else:
168
  extraNames.append(sp)
169
+ extraValues.append(sumTimes(currAnnotation.subset([sp])))
170
  df4_dict = {
171
  "values": valueList+extraValues,
172
  "names": nameList+extraNames,