palbha commited on
Commit
65f35bc
·
verified ·
1 Parent(s): d846897

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -16,10 +16,11 @@ def transcribe_audio(audio_path):
16
  # Upload the audio file
17
  #uploaded_file = client.files.upload(file=audio_path)
18
  print("Audio Path is",audio_path)
 
19
  # Send the file to Gemini for transcription
20
  response = client.models.generate_content(
21
  model='gemini-2.0-flash',
22
- contents=['Transcribe the input audio & return only the transcription.', audio_path]
23
  )
24
 
25
  print("Transcription Response:", response.text)
 
16
  # Upload the audio file
17
  #uploaded_file = client.files.upload(file=audio_path)
18
  print("Audio Path is",audio_path)
19
+ myfile = client.files.upload(file="/content/Recording.mp3")
20
  # Send the file to Gemini for transcription
21
  response = client.models.generate_content(
22
  model='gemini-2.0-flash',
23
+ contents=['Transcribe the input audio & return only the transcription.', myfile]
24
  )
25
 
26
  print("Transcription Response:", response.text)