-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
26 lines (18 loc) · 690 Bytes
/
main.py
File metadata and controls
26 lines (18 loc) · 690 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import streamlit as st
from utils import *
st.title("Mock")
topic = st.text_input("Interview Domain")
if not topic:
st.stop()
if "button_clicked" not in st.session_state:
st.session_state.button_clicked = False
def button_callback():
st.session_state.button_clicked = True
if st.button("Create question", key="create_question", on_click=button_callback) or st.session_state.button_clicked:
question = run_question_bot(topic)
st.write(question)
if st.button("Record Answer", key="record_answer"):
recording()
audio_file = open('recording.wav', 'rb')
audio_bytes = audio_file.read()
st.audio(audio_bytes, format='audio/wav')