DrishtiSharma commited on
Commit
bb6f1e7
Β·
verified Β·
1 Parent(s): 0aba088

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -51,7 +51,7 @@ def chat_chain(vectorstore):
51
  )
52
  return chain
53
 
54
- # Transcribe audio using Groq Whisper
55
  def transcribe_audio(file_path):
56
  """Transcribe audio using Groq's Whisper model."""
57
  with open(file_path, "rb") as file:
@@ -61,7 +61,8 @@ def transcribe_audio(file_path):
61
  response_format="json",
62
  language="en"
63
  )
64
- return transcription['text']
 
65
 
66
  # Streamlit UI
67
  st.title("Chat with PDFs via Audio πŸŽ™οΈπŸ“š")
 
51
  )
52
  return chain
53
 
54
+ # Function to transcribe audio using Groq's Whisper
55
  def transcribe_audio(file_path):
56
  """Transcribe audio using Groq's Whisper model."""
57
  with open(file_path, "rb") as file:
 
61
  response_format="json",
62
  language="en"
63
  )
64
+ # Access the text attribute
65
+ return transcription.text
66
 
67
  # Streamlit UI
68
  st.title("Chat with PDFs via Audio πŸŽ™οΈπŸ“š")