deepsync commited on
Commit
199305f
1 Parent(s): 7d55ccf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -77,6 +77,8 @@ def generate_transliteration_gemini_15_pro(text):
77
  clean_text = lambda res: res.replace("```json", "").replace("```", "").replace("\n", "")
78
  print(response.text)
79
  data = json.loads(clean_text(response.text))
 
 
80
  return clean_hindi_transliterated_text(data["transliterate"])
81
 
82
 
 
77
  clean_text = lambda res: res.replace("```json", "").replace("```", "").replace("\n", "")
78
  print(response.text)
79
  data = json.loads(clean_text(response.text))
80
+ if type(data) is list:
81
+ data = data[0]
82
  return clean_hindi_transliterated_text(data["transliterate"])
83
 
84