Update app.py
Browse files
app.py
CHANGED
@@ -61,13 +61,13 @@ if st.button('Start Transcription'):
|
|
61 |
st.info("Transcribing...")
|
62 |
st.success("Transcription complete")
|
63 |
result = model.transcribe(audio_file_path)
|
64 |
-
transcript = result['text']
|
65 |
|
66 |
with st.expander("See transcript"):
|
67 |
st.markdown(transcript)
|
68 |
|
69 |
# Update the user input field with the transcription
|
70 |
-
userinput = st.text_area("Input Text:", transcript)
|
71 |
|
72 |
# Model Selection Dropdown
|
73 |
model_choice = st.selectbox(
|
@@ -91,7 +91,7 @@ claims_extraction = ""
|
|
91 |
learning_status_placeholder = st.empty()
|
92 |
disable_button_bool = False
|
93 |
|
94 |
-
if userinput and api_key and st.button("Extract Claims", key="claims_extraction", disabled=disable_button_bool):
|
95 |
# Split the user input into chunks
|
96 |
input_chunks = chunk_text(userinput)
|
97 |
|
|
|
61 |
st.info("Transcribing...")
|
62 |
st.success("Transcription complete")
|
63 |
result = model.transcribe(audio_file_path)
|
64 |
+
st.session_state.transcript = result['text']
|
65 |
|
66 |
with st.expander("See transcript"):
|
67 |
st.markdown(transcript)
|
68 |
|
69 |
# Update the user input field with the transcription
|
70 |
+
st.session_state.userinput = st.text_area("Input Text:", transcript)
|
71 |
|
72 |
# Model Selection Dropdown
|
73 |
model_choice = st.selectbox(
|
|
|
91 |
learning_status_placeholder = st.empty()
|
92 |
disable_button_bool = False
|
93 |
|
94 |
+
if st.session_state.userinput and api_key and st.button("Extract Claims", key="claims_extraction", disabled=disable_button_bool):
|
95 |
# Split the user input into chunks
|
96 |
input_chunks = chunk_text(userinput)
|
97 |
|