yappeizhen commited on
Commit
e4d2ebb
Β·
1 Parent(s): 8ac9631

fix: sort records in descending time

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -71,7 +71,7 @@ def get_user_transcripts(username):
71
  arr.append([trans_dict['date'], trans_dict['transcription'], trans_dict['sentiment_output']])
72
  if (len(arr) == 0):
73
  arr = ['', '', '']
74
- return arr
75
 
76
  def get_user_score(username):
77
  doc = db.document(f'Users/{username}').get()
@@ -180,8 +180,8 @@ def inference(username, audio, sentiment_option):
180
  title = """<h1 align="center">β˜• Lim Kopi Call Center Service πŸ’¬</h1>"""
181
  image_path = "coffee_logo.jpg"
182
  description = """
183
- πŸ’» This prototype uses Whisper to conduct audio sentiment analysis on voice recordings of customer service agents. Whisper is a general speech recognition model built by OpenAI. It is trained on a huge dataset of diverse audio, and supports multilingual speech recognition, speech translation, and language identification tasks.<br><br>
184
- βš™οΈ Prototype Components:<br>
185
  <br>
186
  &nbsp;&nbsp;&nbsp;&nbsp; - Language identification<br>
187
  &nbsp;&nbsp;&nbsp;&nbsp; - Real-time multilingual speech recognition<br>
 
71
  arr.append([trans_dict['date'], trans_dict['transcription'], trans_dict['sentiment_output']])
72
  if (len(arr) == 0):
73
  arr = ['', '', '']
74
+ return sorted(arr, key=lambda x:x[0], reverse=True)
75
 
76
  def get_user_score(username):
77
  doc = db.document(f'Users/{username}').get()
 
180
  title = """<h1 align="center">β˜• Lim Kopi Call Center Service πŸ’¬</h1>"""
181
  image_path = "coffee_logo.jpg"
182
  description = """
183
+ πŸ’» This MVP uses Whisper to conduct audio sentiment analysis on voice recordings of customer service agents. Whisper is a general speech recognition model built by OpenAI. It is trained on a huge dataset of diverse audio, and supports multilingual speech recognition, speech translation, and language identification tasks.<br><br>
184
+ βš™οΈ MVP Components:<br>
185
  <br>
186
  &nbsp;&nbsp;&nbsp;&nbsp; - Language identification<br>
187
  &nbsp;&nbsp;&nbsp;&nbsp; - Real-time multilingual speech recognition<br>