EsoCode commited on
Commit
654a1d0
β€’
1 Parent(s): d1144fa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -2,12 +2,11 @@ import gradio as gr
2
  import openai
3
  import requests
4
  import csv
5
- import streamlit as st
6
 
7
 
8
  prompt_templates = {"Default ChatGPT": ""}
9
 
10
- open_ai_key = st.secrets["open_ai_key"]
11
 
12
  def get_empty_state():
13
  return {"total_tokens": 0, "messages": []}
@@ -114,7 +113,7 @@ with gr.Blocks(css=css) as demo:
114
  total_tokens_str = gr.Markdown(elem_id="total_tokens_str")
115
  btn_clear_conversation = gr.Button("πŸ”ƒ Start New Conversation")
116
  with gr.Column():
117
- user_token = gr.Textbox(value=open_ai_key, placeholder="OpenAI API Key", type="password", show_label=False)
118
  prompt_template = gr.Dropdown(label="Set a custom insruction for the chatbot:", choices=list(prompt_templates.keys()))
119
  prompt_template_preview = gr.Textbox(value="prompt_template_preview", type="text", show_label=False)
120
  with gr.Accordion("Advanced parameters", open=False):
 
2
  import openai
3
  import requests
4
  import csv
 
5
 
6
 
7
  prompt_templates = {"Default ChatGPT": ""}
8
 
9
+
10
 
11
  def get_empty_state():
12
  return {"total_tokens": 0, "messages": []}
 
113
  total_tokens_str = gr.Markdown(elem_id="total_tokens_str")
114
  btn_clear_conversation = gr.Button("πŸ”ƒ Start New Conversation")
115
  with gr.Column():
116
+ user_token = gr.Textbox(value='', placeholder="OpenAI API Key", type="password", show_label=False)
117
  prompt_template = gr.Dropdown(label="Set a custom insruction for the chatbot:", choices=list(prompt_templates.keys()))
118
  prompt_template_preview = gr.Textbox(value="prompt_template_preview", type="text", show_label=False)
119
  with gr.Accordion("Advanced parameters", open=False):