Athspi commited on
Commit
f8b6f22
·
verified ·
1 Parent(s): ef2c8e0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -47,7 +47,7 @@ def transcribe_audio(audio_file):
47
  # Function to translate text using Gemini API with a magic prompt
48
  def translate_text(text, target_language):
49
  try:
50
- model = genai.GenerativeModel("gemini-1.5-flash")
51
  prompt = f"Translate the following text to {target_language} and return only the translated text with no additional explanation or commentary:\n\n{text}"
52
  response = model.generate_content(prompt)
53
  translated_text = response.text.strip()
 
47
  # Function to translate text using Gemini API with a magic prompt
48
  def translate_text(text, target_language):
49
  try:
50
+ model = genai.GenerativeModel("gemini-2.0-flash")
51
  prompt = f"Translate the following text to {target_language} and return only the translated text with no additional explanation or commentary:\n\n{text}"
52
  response = model.generate_content(prompt)
53
  translated_text = response.text.strip()