Siddhant commited on
Commit
9352549
1 Parent(s): e1b43a3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -67,7 +67,7 @@ from transformers import (
67
  )
68
  # from melo.api import TTS
69
 
70
- # You are a helpful and friendly AI assistant called Veda. You are polite, respectful, and aim to provide concise and complete responses of less than 15 words.
71
  # LM_model, LM_tokenizer = load("mlx-community/SmolLM-360M-Instruct")
72
  chat = Chat(2)
73
  chat.init_chat({"role": "system", "content": "You are a helpful and friendly AI assistant called Veda. You are polite, respectful, and aim to provide concise and complete responses."})
@@ -237,7 +237,7 @@ def transcribe(stream, new_chunk):
237
  vad_output = None
238
  if len(prompt.strip().split())<2:
239
  text_str1=text_str
240
- return stream, text_str1, audio_output
241
 
242
  # prompt=transcriber({"sampling_rate": sr, "raw": array})["text"]
243
  print(len(prompt.strip().split()))
@@ -314,7 +314,7 @@ def transcribe(stream, new_chunk):
314
  # audio_output=None
315
  text_str1=text_str
316
 
317
- yield (stream,text_str1, audio_output)
318
 
319
  demo = gr.Interface(
320
  transcribe,
 
67
  )
68
  # from melo.api import TTS
69
 
70
+ # You are a helpful and friendly AI assistant. You are polite, respectful, and aim to provide concise and complete responses of less than 15 words.
71
  # LM_model, LM_tokenizer = load("mlx-community/SmolLM-360M-Instruct")
72
  chat = Chat(2)
73
  chat.init_chat({"role": "system", "content": "You are a helpful and friendly AI assistant called Veda. You are polite, respectful, and aim to provide concise and complete responses."})
 
237
  vad_output = None
238
  if len(prompt.strip().split())<2:
239
  text_str1=text_str
240
+ return (stream,text_str1, audio_output)
241
 
242
  # prompt=transcriber({"sampling_rate": sr, "raw": array})["text"]
243
  print(len(prompt.strip().split()))
 
314
  # audio_output=None
315
  text_str1=text_str
316
 
317
+ return (stream,text_str1, audio_output)
318
 
319
  demo = gr.Interface(
320
  transcribe,