Himel09 commited on
Commit
2c9e41d
·
verified ·
1 Parent(s): 37d163b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -27,7 +27,7 @@ def translation_to_French(api_key, text):
27
  max_output_tokens=150
28
  )
29
  )
30
- translated = response_translation.text.strip()
31
 
32
  # Pronunciation prompt
33
  pronunciation_prompt = (
@@ -43,7 +43,7 @@ def translation_to_French(api_key, text):
43
  max_output_tokens=150
44
  )
45
  )
46
- pronunciation = response_pronunciation.text.strip()
47
  return translated, pronunciation
48
 
49
  except Exception as e:
 
27
  max_output_tokens=150
28
  )
29
  )
30
+ translated = response_translation.candidates[0].content.strip()
31
 
32
  # Pronunciation prompt
33
  pronunciation_prompt = (
 
43
  max_output_tokens=150
44
  )
45
  )
46
+ pronunciation = response_pronunciation.candidates[0].content.strip()
47
  return translated, pronunciation
48
 
49
  except Exception as e: