Update app.py
Browse files
app.py
CHANGED
@@ -545,10 +545,10 @@ async def async_interface():
|
|
545 |
st.session_state.timer_start = time.time()
|
546 |
save_username(st.session_state.username)
|
547 |
st.rerun()
|
548 |
-
|
549 |
st.subheader("๐ค Speech-to-Chat")
|
550 |
-
from mycomponent import
|
551 |
-
transcript_data =
|
552 |
if transcript_data and 'value' in transcript_data:
|
553 |
transcript = transcript_data['value'].strip()
|
554 |
if transcript:
|
@@ -570,7 +570,7 @@ async def async_interface():
|
|
570 |
st.rerun()
|
571 |
else:
|
572 |
st.write("๐๏ธ Speak to transcribe your message...")
|
573 |
-
|
574 |
# ๐ธ Media
|
575 |
elif tab_main == "๐ธ Media":
|
576 |
st.header("๐ธ Media Gallery")
|
|
|
545 |
st.session_state.timer_start = time.time()
|
546 |
save_username(st.session_state.username)
|
547 |
st.rerun()
|
548 |
+
|
549 |
st.subheader("๐ค Speech-to-Chat")
|
550 |
+
from mycomponent import mycomponent # Correct import
|
551 |
+
transcript_data = mycomponent(default_value=st.session_state.get('last_transcript', ''), key="speech_input")
|
552 |
if transcript_data and 'value' in transcript_data:
|
553 |
transcript = transcript_data['value'].strip()
|
554 |
if transcript:
|
|
|
570 |
st.rerun()
|
571 |
else:
|
572 |
st.write("๐๏ธ Speak to transcribe your message...")
|
573 |
+
|
574 |
# ๐ธ Media
|
575 |
elif tab_main == "๐ธ Media":
|
576 |
st.header("๐ธ Media Gallery")
|