|
import streamlit as st |
|
from utlis import * |
|
|
|
from st_audiorec import st_audiorec |
|
|
|
st.title("Live Speech to Job Offer Generator") |
|
|
|
|
|
wav_audio_data = st_audiorec() |
|
print(wav_audio_data) |
|
if wav_audio_data is not None: |
|
print("HELLO") |
|
|
|
with st.spinner("Converting..."): |
|
transcribed_text = audio_to_text(wav_audio_data) |
|
st.markdown("_Transcribed Text:_", unsafe_allow_html=True) |
|
st.markdown(f'<p style="text-align: center;">"{transcribed_text}"</p>', unsafe_allow_html=True) |
|
|
|
|
|
if transcribed_text and st.button("Generate Job Offer"): |
|
|
|
with st.spinner("Generate..."): |
|
job_offer = call_ai_api(transcribed_text) |
|
st.write("Generated Job Offer:") |
|
st.write(job_offer) |
|
|