Eriberto commited on
Commit
62848ce
·
1 Parent(s): 0e5f7d6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -14,6 +14,7 @@ bot_name = "bbDemo"
14
  def chat_hf(audio, custom_token):
15
  try:
16
  whisper_text = translate(audio)
 
17
 
18
  # Conversation route
19
  prompt = user_name + ": " + user_input + "\n" + bot_name+ ": "
@@ -29,6 +30,8 @@ def chat_hf(audio, custom_token):
29
 
30
  except:
31
  # Conversation route
 
 
32
  prompt = user_name + ": " + user_input + "\n" + bot_name+ ": "
33
  conversation += prompt # allows for context
34
  # fetch the response from open AI api
 
14
  def chat_hf(audio, custom_token):
15
  try:
16
  whisper_text = translate(audio)
17
+ user_input = whisper_text
18
 
19
  # Conversation route
20
  prompt = user_name + ": " + user_input + "\n" + bot_name+ ": "
 
30
 
31
  except:
32
  # Conversation route
33
+ whisper_text = translate(audio)
34
+ user_input = whisper_text
35
  prompt = user_name + ": " + user_input + "\n" + bot_name+ ": "
36
  conversation += prompt # allows for context
37
  # fetch the response from open AI api