charbaaz356 commited on
Commit
0d510db
·
1 Parent(s): f537bc4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -11
app.py CHANGED
@@ -1,4 +1,3 @@
1
-
2
  import io
3
  import os
4
  import ssl
@@ -874,16 +873,7 @@ with gr.Blocks(css=".gradio-container {background-color: lightgray}") as block:
874
  qa_chain_state, docsearch_state, use_embeddings_state],
875
  outputs=[chatbot, history_state, video_html, my_file, audio_html, tmp_aud_file, message])
876
  # outputs=[chatbot, history_state, audio_html, tmp_aud_file, message])
877
- openai_api_key_textbox.change(None,
878
- inputs=[openai_api_key_textbox],
879
- outputs=None, _js="(api_key) => localStorage.setItem('open_api_key', api_key)")
880
 
881
- openai_api_key_textbox.change(set_openai_api_key,
882
- inputs=[openai_api_key_textbox],
883
- outputs=[chain_state, express_chain_state, llm_state, embeddings_state,
884
- qa_chain_state, memory_state])
885
-
886
- block.load(None, inputs=None, outputs=openai_api_key_textbox, _js="()=> localStorage.getItem('open_api_key')")
887
  openai_api_key_textbox.change(None,
888
  inputs=[openai_api_key_textbox],
889
  outputs=None, _js="(api_key) => localStorage.setItem('open_api_key', api_key)")
@@ -896,4 +886,4 @@ with gr.Blocks(css=".gradio-container {background-color: lightgray}") as block:
896
  block.load(None, inputs=None, outputs=openai_api_key_textbox, _js="()=> localStorage.getItem('open_api_key')")
897
 
898
 
899
- block.launch(debug=True)
 
 
1
  import io
2
  import os
3
  import ssl
 
873
  qa_chain_state, docsearch_state, use_embeddings_state],
874
  outputs=[chatbot, history_state, video_html, my_file, audio_html, tmp_aud_file, message])
875
  # outputs=[chatbot, history_state, audio_html, tmp_aud_file, message])
 
 
 
876
 
 
 
 
 
 
 
877
  openai_api_key_textbox.change(None,
878
  inputs=[openai_api_key_textbox],
879
  outputs=None, _js="(api_key) => localStorage.setItem('open_api_key', api_key)")
 
886
  block.load(None, inputs=None, outputs=openai_api_key_textbox, _js="()=> localStorage.getItem('open_api_key')")
887
 
888
 
889
+ block.launch(debug=True)