Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -887,10 +887,10 @@ if st.session_state["generated_questions"]:
|
|
| 887 |
if st.button("⏹️ Confirm & Next"):
|
| 888 |
try:
|
| 889 |
with st.spinner("🧠 Transcribing your answer..."):
|
| 890 |
-
|
| 891 |
-
|
| 892 |
-
|
| 893 |
-
|
| 894 |
|
| 895 |
except Exception as e:
|
| 896 |
st.error(f"❌ Transcription error: {e}")
|
|
|
|
| 887 |
if st.button("⏹️ Confirm & Next"):
|
| 888 |
try:
|
| 889 |
with st.spinner("🧠 Transcribing your answer..."):
|
| 890 |
+
result = model.transcribe(st.session_state["response_file"])
|
| 891 |
+
transcript = result["text"].strip()
|
| 892 |
+
if not transcript:
|
| 893 |
+
transcript = "[Transcription failed or empty]"
|
| 894 |
|
| 895 |
except Exception as e:
|
| 896 |
st.error(f"❌ Transcription error: {e}")
|