prithivMLmods commited on
Commit
94d1453
·
verified ·
1 Parent(s): 325626b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -51,8 +51,6 @@ TTS_VOICES = [
51
  "en-US-DavisNeural", # @tts4
52
  "en-US-JaneNeural", # @tts5
53
  "en-US-JasonNeural", # @tts6
54
- "en-US-NancyNeural", # @tts7
55
- "en-US-TonyNeural", # @tts8
56
  ]
57
 
58
  MODEL_ID = "prithivMLmods/Qwen2-VL-OCR-2B-Instruct"
@@ -93,8 +91,8 @@ def generate(
93
 
94
  # Check if message is for TTS
95
  tts_prefix = "@tts"
96
- is_tts = any(text.strip().lower().startswith(f"{tts_prefix}{i}") for i in range(1, 9))
97
- voice_index = next((i for i in range(1, 9) if text.strip().lower().startswith(f"{tts_prefix}{i}")), None)
98
 
99
  if is_tts and voice_index:
100
  voice = TTS_VOICES[voice_index - 1]
 
51
  "en-US-DavisNeural", # @tts4
52
  "en-US-JaneNeural", # @tts5
53
  "en-US-JasonNeural", # @tts6
 
 
54
  ]
55
 
56
  MODEL_ID = "prithivMLmods/Qwen2-VL-OCR-2B-Instruct"
 
91
 
92
  # Check if message is for TTS
93
  tts_prefix = "@tts"
94
+ is_tts = any(text.strip().lower().startswith(f"{tts_prefix}{i}") for i in range(1, 7))
95
+ voice_index = next((i for i in range(1, 7) if text.strip().lower().startswith(f"{tts_prefix}{i}")), None)
96
 
97
  if is_tts and voice_index:
98
  voice = TTS_VOICES[voice_index - 1]