Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -413,22 +413,7 @@ def main():
|
|
413 |
col1, col2 = st.columns(2)
|
414 |
with col1:
|
415 |
st.write("ποΈ Speech Recognition")
|
416 |
-
|
417 |
-
|
418 |
-
if voice_input and voice_input != st.session_state['last_voice_input']:
|
419 |
-
st.session_state['last_voice_input'] = voice_input
|
420 |
-
st.markdown("**Transcribed Text:**")
|
421 |
-
st.write(voice_input)
|
422 |
-
|
423 |
-
if st.button("π Search"):
|
424 |
-
with st.spinner("Searching..."):
|
425 |
-
results = search.search(voice_input, None, num_results)
|
426 |
-
for i, result in enumerate(results, 1):
|
427 |
-
with st.expander(f"Result {i}", expanded=i==1):
|
428 |
-
st.write(result['description'])
|
429 |
-
if result.get('youtube_id'):
|
430 |
-
st.video(f"https://youtube.com/watch?v={result['youtube_id']}&t={result.get('start_time', 0)}")
|
431 |
-
|
432 |
with col2:
|
433 |
st.write("π΅ Audio Recording")
|
434 |
audio_bytes = audio_recorder()
|
|
|
413 |
col1, col2 = st.columns(2)
|
414 |
with col1:
|
415 |
st.write("ποΈ Speech Recognition")
|
416 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
417 |
with col2:
|
418 |
st.write("π΅ Audio Recording")
|
419 |
audio_bytes = audio_recorder()
|