Spaces:
Sleeping
Sleeping
bikas
commited on
Commit
•
2c4de68
1
Parent(s):
80be33f
Update folder
Browse files- app.py +13 -0
- data/requirements.txt +53 -0
app.py
CHANGED
@@ -90,6 +90,10 @@ def main():
|
|
90 |
|
91 |
user_content = ""
|
92 |
|
|
|
|
|
|
|
|
|
93 |
# Conditional logic based on sidebar selection
|
94 |
if upload_option == "Upload Audio File":
|
95 |
audio_file = st.sidebar.file_uploader("Upload an audio file", type=["mp3", "wav", "m4a"])
|
@@ -98,6 +102,9 @@ def main():
|
|
98 |
if not email:
|
99 |
st.warning("Please enter your email address.")
|
100 |
return
|
|
|
|
|
|
|
101 |
st.info("Transcribing audio... Please wait.")
|
102 |
user_content = get_speech_transcription(audio_file)
|
103 |
st.success("Audio transcribed successfully!")
|
@@ -109,6 +116,9 @@ def main():
|
|
109 |
if not email:
|
110 |
st.warning("Please enter your email address.")
|
111 |
return
|
|
|
|
|
|
|
112 |
user_content = text_file.read().decode("utf-8")
|
113 |
st.success("Text file uploaded successfully!")
|
114 |
|
@@ -119,6 +129,9 @@ def main():
|
|
119 |
if not email:
|
120 |
st.warning("Please enter your email address.")
|
121 |
return
|
|
|
|
|
|
|
122 |
if not user_content:
|
123 |
st.warning("Please paste some text before generating the MoM.")
|
124 |
return
|
|
|
90 |
|
91 |
user_content = ""
|
92 |
|
93 |
+
# Function to check email validity
|
94 |
+
def is_valid_email(email):
|
95 |
+
return email.endswith(".com") and "@" in email
|
96 |
+
|
97 |
# Conditional logic based on sidebar selection
|
98 |
if upload_option == "Upload Audio File":
|
99 |
audio_file = st.sidebar.file_uploader("Upload an audio file", type=["mp3", "wav", "m4a"])
|
|
|
102 |
if not email:
|
103 |
st.warning("Please enter your email address.")
|
104 |
return
|
105 |
+
if not is_valid_email(email):
|
106 |
+
st.warning("Please enter a valid email address with a '.com' extension.")
|
107 |
+
return
|
108 |
st.info("Transcribing audio... Please wait.")
|
109 |
user_content = get_speech_transcription(audio_file)
|
110 |
st.success("Audio transcribed successfully!")
|
|
|
116 |
if not email:
|
117 |
st.warning("Please enter your email address.")
|
118 |
return
|
119 |
+
if not is_valid_email(email):
|
120 |
+
st.warning("Please enter a valid email address with a '.com' extension.")
|
121 |
+
return
|
122 |
user_content = text_file.read().decode("utf-8")
|
123 |
st.success("Text file uploaded successfully!")
|
124 |
|
|
|
129 |
if not email:
|
130 |
st.warning("Please enter your email address.")
|
131 |
return
|
132 |
+
if not is_valid_email(email):
|
133 |
+
st.warning("Please enter a valid email address with a '.com' extension.")
|
134 |
+
return
|
135 |
if not user_content:
|
136 |
st.warning("Please paste some text before generating the MoM.")
|
137 |
return
|
data/requirements.txt
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
accelerate==1.0.1
|
2 |
+
google-ai-generativelanguage==0.6.10
|
3 |
+
google-api-core==2.21.0
|
4 |
+
google-api-python-client==2.149.0
|
5 |
+
google-auth==2.35.0
|
6 |
+
google-auth-httplib2==0.2.0
|
7 |
+
google-generativeai==0.8.3
|
8 |
+
googleapis-common-protos==1.65.0
|
9 |
+
groq==0.11.0
|
10 |
+
grpcio==1.66.2
|
11 |
+
grpcio-status==1.66.2
|
12 |
+
huggingface-hub==0.25.2
|
13 |
+
joblib==1.4.2
|
14 |
+
numba==0.60.0
|
15 |
+
numpy==2.0.2
|
16 |
+
packaging==24.1
|
17 |
+
pandas==2.2.3
|
18 |
+
prompt_toolkit==3.0.48
|
19 |
+
pyarrow==17.0.0
|
20 |
+
pycparser==2.22
|
21 |
+
pydantic==2.9.2
|
22 |
+
Pygments==2.18.0
|
23 |
+
python-dateutil==2.9.0.post0
|
24 |
+
python-dotenv==1.0.1
|
25 |
+
pytz==2024.2
|
26 |
+
redis==5.1.1
|
27 |
+
referencing==0.35.1
|
28 |
+
regex==2024.9.11
|
29 |
+
requests==2.32.3
|
30 |
+
rsa==4.9
|
31 |
+
safetensors==0.4.5
|
32 |
+
scikit-learn==1.5.2
|
33 |
+
scipy==1.14.1
|
34 |
+
setuptools==75.1.0
|
35 |
+
six==1.16.0
|
36 |
+
smmap==5.0.1
|
37 |
+
sniffio==1.3.1
|
38 |
+
soundfile==0.12.1
|
39 |
+
soxr==0.5.0.post1
|
40 |
+
streamlit==1.39.0
|
41 |
+
streamlit-authenticator==0.4.1
|
42 |
+
tqdm==4.66.5
|
43 |
+
transformers==4.45.2
|
44 |
+
triton==3.0.0
|
45 |
+
typing_extensions==4.12.2
|
46 |
+
tzdata==2024.2
|
47 |
+
uritemplate==4.1.1
|
48 |
+
urllib3==2.2.3
|
49 |
+
vine==5.1.0
|
50 |
+
watchdog==5.0.3
|
51 |
+
wcwidth==0.2.13
|
52 |
+
Werkzeug==3.0.4
|
53 |
+
wheel==0.44.0
|