rjiang12 commited on
Commit
c273287
·
1 Parent(s): 53af920

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -477,7 +477,10 @@ with gr.Blocks(theme=soft, title="Social Bias Testing in Language Models",
477
  # elem_id="gen_model_check")
478
  with gr.Row(visible=False) as online_gen_row:
479
  # OpenAI Key for generator
480
- openai_key = gr.Textbox(value= curr_openai_key, lines=1, label="OpenAI API Key",
 
 
 
481
  placeholder="starts with sk-",
482
  info="Please provide the key for an Open AI account to generate new test sentences",
483
  visible=True,
 
477
  # elem_id="gen_model_check")
478
  with gr.Row(visible=False) as online_gen_row:
479
  # OpenAI Key for generator
480
+ value = ""
481
+ if(curr_openai_key != ""):
482
+ value = curr_openai_key
483
+ openai_key = gr.Textbox(value=value, lines=1, label="OpenAI API Key",
484
  placeholder="starts with sk-",
485
  info="Please provide the key for an Open AI account to generate new test sentences",
486
  visible=True,