awacke1 commited on
Commit
7c4d12b
β€’
1 Parent(s): b587eb2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -864,9 +864,9 @@ def set_transcript(text):
864
  """Set transcript in session state."""
865
  st.session_state.voice_transcript = text
866
 
867
-
868
  def main():
869
  st.sidebar.markdown("### 🚲BikeAIπŸ† Claude and GPT Multi-Agent Research AI")
 
870
  # Main navigation
871
  tab_main = st.radio("Choose Action:",
872
  ["🎀 Voice Input", "πŸ’¬ Chat", "πŸ“Έ Media Gallery", "πŸ” Search ArXiv", "πŸ“ File Editor"],
@@ -883,7 +883,7 @@ def main():
883
  transcript = st.components.v1.html(speech_recognition_html, height=400)
884
 
885
  # Update session state if there's new data
886
- if transcript is not None:
887
  st.session_state.voice_transcript = transcript
888
 
889
  # Display the transcript in a Streamlit text area
@@ -900,9 +900,7 @@ def main():
900
  if st.button("Clear Transcript"):
901
  st.session_state.voice_transcript = ""
902
  st.rerun()
903
-
904
- #st.markdown("### Processed Voice Input:")
905
- #st.text_area("Voice Transcript", st.session_state.voice_transcript, height=100)
906
 
907
  # Buttons to process the transcript
908
  if st.button("Search with GPT"):
 
864
  """Set transcript in session state."""
865
  st.session_state.voice_transcript = text
866
 
 
867
  def main():
868
  st.sidebar.markdown("### 🚲BikeAIπŸ† Claude and GPT Multi-Agent Research AI")
869
+
870
  # Main navigation
871
  tab_main = st.radio("Choose Action:",
872
  ["🎀 Voice Input", "πŸ’¬ Chat", "πŸ“Έ Media Gallery", "πŸ” Search ArXiv", "πŸ“ File Editor"],
 
883
  transcript = st.components.v1.html(speech_recognition_html, height=400)
884
 
885
  # Update session state if there's new data
886
+ if transcript is not None and transcript != "":
887
  st.session_state.voice_transcript = transcript
888
 
889
  # Display the transcript in a Streamlit text area
 
900
  if st.button("Clear Transcript"):
901
  st.session_state.voice_transcript = ""
902
  st.rerun()
903
+
 
 
904
 
905
  # Buttons to process the transcript
906
  if st.button("Search with GPT"):