chibop commited on
Commit
f22c88d
·
verified ·
1 Parent(s): 0b1c230

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. chat.py +2 -2
chat.py CHANGED
@@ -30,7 +30,7 @@ def start_thread():
30
  def user(text, audio, history, thread):
31
  if audio:
32
  text = transcribe(audio)
33
- print("Message:", text)
34
  message = client.beta.threads.messages.create(thread_id=thread.id, role="user", content=text)
35
  return "", history + [[text, None]]
36
 
@@ -45,7 +45,7 @@ def bot(history, thread):
45
  except: pass
46
 
47
  def transcribe(file):
48
- print("Transcribe:", file)
49
  file = open(file, "rb")
50
  response = client.audio.transcriptions.create(
51
  file=file,
 
30
  def user(text, audio, history, thread):
31
  if audio:
32
  text = transcribe(audio)
33
+ print(f"Message: {text}")
34
  message = client.beta.threads.messages.create(thread_id=thread.id, role="user", content=text)
35
  return "", history + [[text, None]]
36
 
 
45
  except: pass
46
 
47
  def transcribe(file):
48
+ print(f"Transcribe: {file}")
49
  file = open(file, "rb")
50
  response = client.audio.transcriptions.create(
51
  file=file,