DiffusionGPT commited on
Commit
1cc25b5
1 Parent(s): 7e8d9c5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -640,10 +640,11 @@ if __name__ == '__main__':
640
  os.environ['OPENAI_API_KEY'] = apikey
641
  global bot
642
  bot = ConversationBot(load_dict=load_dict)
 
643
  print('set new api key:', apikey)
644
  return None
645
 
646
- init_api(apikey="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")
647
  def inference_warp(prompt):
648
  prompt = prompt.strip()
649
  global bot
@@ -668,12 +669,12 @@ if __name__ == '__main__':
668
  state = gr.State([])
669
  with gr.Row():
670
  with gr.Column():
671
- apikey = gr.Textbox(label='apikey', value="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")
672
  prompt = gr.Textbox(label='Prompt')
673
  run_button = gr.Button('Generate Image')
674
 
675
  result = gr.Image(label="Generated Image")
676
- bot.init_agent("English")
677
  run_button.click(fn=inference_warp,
678
  inputs=prompt,
679
  outputs=result,)
 
640
  os.environ['OPENAI_API_KEY'] = apikey
641
  global bot
642
  bot = ConversationBot(load_dict=load_dict)
643
+ bot.init_agent("English")
644
  print('set new api key:', apikey)
645
  return None
646
 
647
+ init_api(apikey="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")
648
  def inference_warp(prompt):
649
  prompt = prompt.strip()
650
  global bot
 
669
  state = gr.State([])
670
  with gr.Row():
671
  with gr.Column():
672
+ apikey = gr.Textbox(label='apikey', value="")
673
  prompt = gr.Textbox(label='Prompt')
674
  run_button = gr.Button('Generate Image')
675
 
676
  result = gr.Image(label="Generated Image")
677
+
678
  run_button.click(fn=inference_warp,
679
  inputs=prompt,
680
  outputs=result,)