shikharyashmaurya commited on
Commit
cc72a98
1 Parent(s): 26406e6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -78,13 +78,13 @@ if audio_text:
78
 
79
  audio_file = st.file_uploader("Upload an audio file", type=["mp3", "wav", "ogg"])
80
 
81
- def generate_gemini_content(prompt,audio_file):
82
 
83
  with tempfile.NamedTemporaryFile(suffix='.wav', delete=False) as tmp_file:
84
  tmp_file.write(audio_file.getvalue())
85
  tmp_file.close() # close the file
86
 
87
- model = genai.GenerativeModel("models/gemini-1.5-pro-latest")
88
  your_file = genai.upload_file(tmp_file.name)
89
  response = model.generate_content([audio_prompt, your_file])
90
  return response.text
 
78
 
79
  audio_file = st.file_uploader("Upload an audio file", type=["mp3", "wav", "ogg"])
80
 
81
+ def generate_gemini_content(audio_prompt,audio_file):
82
 
83
  with tempfile.NamedTemporaryFile(suffix='.wav', delete=False) as tmp_file:
84
  tmp_file.write(audio_file.getvalue())
85
  tmp_file.close() # close the file
86
 
87
+ model = genai.GenerativeModel("gemini-1.5-pro-latest")
88
  your_file = genai.upload_file(tmp_file.name)
89
  response = model.generate_content([audio_prompt, your_file])
90
  return response.text