awacke1 commited on
Commit
f00a904
Β·
verified Β·
1 Parent(s): e05ce15

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +33 -36
app.py CHANGED
@@ -869,10 +869,10 @@ def main():
869
 
870
  # Main navigation
871
  tab_main = st.radio("Choose Action:",
872
- ["🎀 Voice Input", "πŸ’¬ Chat", "πŸ“Έ Media Gallery", "πŸ” Search ArXiv", "πŸ“ File Editor"],
873
  horizontal=True)
874
 
875
- if tab_main == "🎀 Voice Input":
876
  st.subheader("Voice Recognition")
877
 
878
  # Initialize session state for the transcript
@@ -887,47 +887,47 @@ def main():
887
  st.session_state.voice_transcript = transcript
888
 
889
  # Display the transcript in a Streamlit text area
890
- st.markdown("### Processed Voice Input:")
891
- st.text_area("Voice Transcript", st.session_state.voice_transcript, height=100)
892
 
893
  # Add functionality to process the transcript
894
- if st.button("Process Transcript"):
895
- st.subheader("AI Response to Transcript")
896
- gpt_response = process_with_gpt(st.session_state.voice_transcript)
897
- st.markdown(gpt_response)
898
 
899
  # Option to clear the transcript
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"):
907
- st.subheader("GPT-4o Response")
908
- gpt_response = process_with_gpt(st.session_state.voice_transcript)
909
- st.markdown(gpt_response)
910
-
911
- if st.button("Search with Claude"):
912
- st.subheader("Claude Response")
913
- claude_response = process_with_claude(st.session_state.voice_transcript)
914
- st.markdown(claude_response)
915
-
916
- if st.button("Search ArXiv"):
917
- st.subheader("ArXiv Search Results")
918
- arxiv_results = perform_ai_lookup(st.session_state.voice_transcript)
919
- st.markdown(arxiv_results)
920
 
921
 
922
  # Display last voice input
923
- if st.session_state.last_voice_input:
924
- st.text_area("Last Voice Input:", st.session_state.last_voice_input, height=100)
925
 
926
 
927
  # Model Selection
928
  model_choice = st.sidebar.radio(
929
  "Choose AI Model:",
930
- ["GPT-4o", "Claude-3", "GPT+Claude+Arxiv"]
931
  )
932
 
933
  # Chat Interface
@@ -976,17 +976,14 @@ def main():
976
  with st.chat_message(message["role"]):
977
  st.markdown(message["content"])
978
 
979
-
980
  # ------------------------------------------------------- ************************* --->
981
 
982
-
983
-
984
- if tab_main == "πŸ’¬ Chat":
985
  # Model Selection
986
- model_choice = st.sidebar.radio(
987
- "Choose AI Model:",
988
- ["GPT-4o", "Claude-3", "GPT+Claude+Arxiv"]
989
- )
990
 
991
  # Chat Interface
992
  user_input = st.text_area("Message:", height=100)
 
869
 
870
  # Main navigation
871
  tab_main = st.radio("Choose Action:",
872
+ ["🎀 Voice Input πŸ’¬ Chat", "πŸ“Έ Media Gallery", "πŸ” Search ArXiv", "πŸ“ File Editor"],
873
  horizontal=True)
874
 
875
+ if tab_main == "🎀 Voice Input πŸ’¬ Chat":
876
  st.subheader("Voice Recognition")
877
 
878
  # Initialize session state for the transcript
 
887
  st.session_state.voice_transcript = transcript
888
 
889
  # Display the transcript in a Streamlit text area
890
+ #st.markdown("### Processed Voice Input:")
891
+ #st.text_area("Voice Transcript", st.session_state.voice_transcript, height=100)
892
 
893
  # Add functionality to process the transcript
894
+ #if st.button("Process Transcript"):
895
+ # st.subheader("AI Response to Transcript")
896
+ # gpt_response = process_with_gpt(st.session_state.voice_transcript)
897
+ # st.markdown(gpt_response)
898
 
899
  # Option to clear the transcript
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"):
907
+ # st.subheader("GPT-4o Response")
908
+ # gpt_response = process_with_gpt(st.session_state.voice_transcript)
909
+ # st.markdown(gpt_response)
910
+
911
+ #if st.button("Search with Claude"):
912
+ # st.subheader("Claude Response")
913
+ # claude_response = process_with_claude(st.session_state.voice_transcript)
914
+ # st.markdown(claude_response)
915
+
916
+ #if st.button("Search ArXiv"):
917
+ # st.subheader("ArXiv Search Results")
918
+ # arxiv_results = perform_ai_lookup(st.session_state.voice_transcript)
919
+ # st.markdown(arxiv_results)
920
 
921
 
922
  # Display last voice input
923
+ #if st.session_state.last_voice_input:
924
+ # st.text_area("Last Voice Input:", st.session_state.last_voice_input, height=100)
925
 
926
 
927
  # Model Selection
928
  model_choice = st.sidebar.radio(
929
  "Choose AI Model:",
930
+ ["GPT+Claude+Arxiv", "GPT-4o", "Claude-3"]
931
  )
932
 
933
  # Chat Interface
 
976
  with st.chat_message(message["role"]):
977
  st.markdown(message["content"])
978
 
 
979
  # ------------------------------------------------------- ************************* --->
980
 
981
+ #if tab_main == "πŸ’¬ Chat":
 
 
982
  # Model Selection
983
+ #model_choice = st.sidebar.radio(
984
+ # "Choose AI Model:",
985
+ # ["GPT-4o", "Claude-3", "GPT+Claude+Arxiv"]
986
+ #)
987
 
988
  # Chat Interface
989
  user_input = st.text_area("Message:", height=100)