Tycohs commited on
Commit
da74a56
·
1 Parent(s): e826754

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -110,7 +110,7 @@ with gr.Blocks() as demo:
110
 
111
  def checkapiinput(apikey):
112
  if apikey != "" and apikey is not None and len(apikey) >=25 and len(apikey) <= 130:
113
- openai.api_key = apikey.value
114
  return gr.update(visible=True), gr.update(visible=False), gr.update(visible=True), gr.update(visible=True)
115
  else:
116
  return gr.update(visible=False), gr.update(visible=True), gr.update(value="", placeholder="Use a valid API key"), gr.update(visible=False)
 
110
 
111
  def checkapiinput(apikey):
112
  if apikey != "" and apikey is not None and len(apikey) >=25 and len(apikey) <= 130:
113
+ openai.api_key = apikey
114
  return gr.update(visible=True), gr.update(visible=False), gr.update(visible=True), gr.update(visible=True)
115
  else:
116
  return gr.update(visible=False), gr.update(visible=True), gr.update(value="", placeholder="Use a valid API key"), gr.update(visible=False)