Spaces:
Runtime error
Runtime error
Commit
•
f75c63f
1
Parent(s):
e5bcc08
Update app.py
Browse files
app.py
CHANGED
@@ -808,8 +808,8 @@ with gr.Blocks(css=".gradio-container {background-color: lightgray}") as block:
|
|
808 |
gr.HTML(
|
809 |
"""<b><center>Cover Whale Agent Resource Center ChatGPT Demo</center></b>""")
|
810 |
|
811 |
-
openai_api_key_textbox = gr.Textbox(placeholder="Paste your OpenAI API key (sk-...) and hit Enter",
|
812 |
-
|
813 |
|
814 |
with gr.Row():
|
815 |
with gr.Column(scale=1, min_width=TALKING_HEAD_WIDTH, visible=False):
|
@@ -836,6 +836,14 @@ with gr.Blocks(css=".gradio-container {background-color: lightgray}") as block:
|
|
836 |
embeddings_text_box = gr.Textbox(value=ARC, visible=False, label="Enter text for embeddings and hit Create:",
|
837 |
lines=20)
|
838 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
839 |
with gr.Row():
|
840 |
use_embeddings_cb = gr.Checkbox(label="Use embeddings", value=True)
|
841 |
use_embeddings_cb.change(update_use_embeddings, inputs=[use_embeddings_cb, use_embeddings_state],
|
|
|
808 |
gr.HTML(
|
809 |
"""<b><center>Cover Whale Agent Resource Center ChatGPT Demo</center></b>""")
|
810 |
|
811 |
+
#openai_api_key_textbox = gr.Textbox(placeholder="Paste your OpenAI API key (sk-...) and hit Enter",
|
812 |
+
# show_label=False, lines=1, type='password')
|
813 |
|
814 |
with gr.Row():
|
815 |
with gr.Column(scale=1, min_width=TALKING_HEAD_WIDTH, visible=False):
|
|
|
836 |
embeddings_text_box = gr.Textbox(value=ARC, visible=False, label="Enter text for embeddings and hit Create:",
|
837 |
lines=20)
|
838 |
|
839 |
+
with gr.Row():
|
840 |
+
openai_api_key_textbox = gr.Textbox(value=os.environ['gptapikey'], placeholder="Paste your OpenAI API key (sk-...) and hit Enter",
|
841 |
+
show_label=False, lines=1, type='password')
|
842 |
+
#api_text_submit = gr.Button(value="Activate Embeddings", variant="secondary").style(full_width=False)
|
843 |
+
#api_text_submit.click(update_embeddings,
|
844 |
+
# inputs=[embeddings_text_box, embeddings_state, qa_chain_state],
|
845 |
+
# outputs=[docsearch_state])
|
846 |
+
|
847 |
with gr.Row():
|
848 |
use_embeddings_cb = gr.Checkbox(label="Use embeddings", value=True)
|
849 |
use_embeddings_cb.change(update_use_embeddings, inputs=[use_embeddings_cb, use_embeddings_state],
|