Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -10,12 +10,15 @@ import pyttsx3
|
|
10 |
import os
|
11 |
from datetime import datetime
|
12 |
import torch
|
13 |
-
from torchvision.models.mobilenetv2 import MobileNetV2
|
|
|
14 |
# ========== TTS ENGINE ==========
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
|
|
|
|
19 |
|
20 |
# ========== CURRENCY TYPE ==========
|
21 |
currency_type = st.selectbox("Select currency type:", ["PKR (Pakistani Rupees)", "USD (US Dollars)", "INR (Indian Rupees)"])
|
|
|
10 |
import os
|
11 |
from datetime import datetime
|
12 |
import torch
|
13 |
+
from torchvision.models.mobilenetv2 import MobileNetV2
|
14 |
+
from gtts import gTTS
|
15 |
# ========== TTS ENGINE ==========
|
16 |
+
|
17 |
+
def speak_streamlit(text):
|
18 |
+
tts = gTTS(text=text, lang='en')
|
19 |
+
tts.save("temp.mp3")
|
20 |
+
st.audio("temp.mp3", format="audio/mp3")
|
21 |
+
|
22 |
|
23 |
# ========== CURRENCY TYPE ==========
|
24 |
currency_type = st.selectbox("Select currency type:", ["PKR (Pakistani Rupees)", "USD (US Dollars)", "INR (Indian Rupees)"])
|