Spaces:
Running
Running
Update app.py
Browse files
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-
|
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()
|