Nechba commited on
Commit
858c91b
·
verified ·
1 Parent(s): 83360ef

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -22
app.py CHANGED
@@ -1,22 +1,24 @@
1
- import streamlit as st
2
- from utlis import *
3
-
4
- from st_audiorec import st_audiorec
5
-
6
- st.title("Live Speech to Job Offer Generator")
7
-
8
- # Capture live audio
9
- wav_audio_data = st_audiorec()
10
-
11
- if wav_audio_data is not None:
12
- # Convert audio to text
13
- transcribed_text = audio_to_text(wav_audio_data)
14
- st.markdown("_Transcribed Text:_", unsafe_allow_html=True) # Italicize and center the label
15
- st.markdown(f'<p style="text-align: center;">"{transcribed_text}"</p>', unsafe_allow_html=True) # Center the transcribed text and keep it in quotes
16
-
17
-
18
- if transcribed_text and st.button("Generate Job Offer"):
19
- # Generate the job offer from the text
20
- job_offer = call_ai_api(transcribed_text)
21
- st.write("Generated Job Offer:")
22
- st.write(job_offer)
 
 
 
1
+ import streamlit as st
2
+ from utlis import *
3
+
4
+ from st_audiorec import st_audiorec
5
+
6
+ st.title("Live Speech to Job Offer Generator")
7
+
8
+ # Capture live audio
9
+ wav_audio_data = st_audiorec()
10
+
11
+ if wav_audio_data is not None:
12
+ # Convert audio to text
13
+ with st.spinner("Converting..."):
14
+ transcribed_text = audio_to_text(wav_audio_data)
15
+ st.markdown("_Transcribed Text:_", unsafe_allow_html=True) # Italicize and center the label
16
+ st.markdown(f'<p style="text-align: center;">"{transcribed_text}"</p>', unsafe_allow_html=True) # Center the transcribed text and keep it in quotes
17
+
18
+
19
+ if transcribed_text and st.button("Generate Job Offer"):
20
+ # Generate the job offer from the text
21
+ with st.spinner("Generate..."):
22
+ job_offer = call_ai_api(transcribed_text)
23
+ st.write("Generated Job Offer:")
24
+ st.write(job_offer)