Rijgersberg commited on
Commit
19dbebb
·
verified ·
1 Parent(s): 6fc978b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -7,7 +7,7 @@ import requests
7
  API_URL = "https://api.openai.com/v1/chat/completions" #os.getenv("API_URL") + "/generate_stream"
8
 
9
  #Testing with my Open AI Key
10
- OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
11
 
12
  def predict(inputs, top_p, temperature, openai_api_key, chat_counter, chatbot=[], history=[]): #repetition_penalty, top_k
13
 
@@ -108,7 +108,7 @@ with gr.Blocks(css = """#col_container {width: 1000px; margin-left: auto; margin
108
  #chatbot {height: 520px; overflow: auto;}""") as demo:
109
  gr.HTML(title)
110
  with gr.Column(elem_id = "col_container"):
111
- openai_api_key = gr.Textbox(type='password', label="Enter your OpenAI API key here", value=OPENAI_API_KEY)
112
  chatbot = gr.Chatbot(elem_id='chatbot') #c
113
  inputs = gr.Textbox(placeholder= "Type here!", label= "Type an input and press Enter") #t
114
  state = gr.State([]) #s
 
7
  API_URL = "https://api.openai.com/v1/chat/completions" #os.getenv("API_URL") + "/generate_stream"
8
 
9
  #Testing with my Open AI Key
10
+ # OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
11
 
12
  def predict(inputs, top_p, temperature, openai_api_key, chat_counter, chatbot=[], history=[]): #repetition_penalty, top_k
13
 
 
108
  #chatbot {height: 520px; overflow: auto;}""") as demo:
109
  gr.HTML(title)
110
  with gr.Column(elem_id = "col_container"):
111
+ openai_api_key = gr.Textbox(type='password', label="Enter your OpenAI API key here")
112
  chatbot = gr.Chatbot(elem_id='chatbot') #c
113
  inputs = gr.Textbox(placeholder= "Type here!", label= "Type an input and press Enter") #t
114
  state = gr.State([]) #s