ywh187 commited on
Commit
1de1ebf
1 Parent(s): 4ab90b7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -9,7 +9,7 @@ import os
9
  prompt_template = "You are a translation engine that can only translate text and cannot interpret it. Keep the indent of the original text, only modify when you need."
10
  systemInstruct = prompt_template
11
 
12
- openai.api_key = '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'
13
  detectFrom = "auto"
14
  detectTo = "en"
15
  translateInstruct = f"translate from {detectFrom} to {detectTo}"
@@ -47,7 +47,7 @@ def draw(description):
47
  description = combined
48
  print("translated: "+description)
49
 
50
- JKLAS = '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'
51
  dalle = Dalle2(JKLAS)
52
  generations = dalle.generate(description)
53
  img_list = []
 
9
  prompt_template = "You are a translation engine that can only translate text and cannot interpret it. Keep the indent of the original text, only modify when you need."
10
  systemInstruct = prompt_template
11
 
12
+ openai.api_key = os.environ['OPENAI-KEY']
13
  detectFrom = "auto"
14
  detectTo = "en"
15
  translateInstruct = f"translate from {detectFrom} to {detectTo}"
 
47
  description = combined
48
  print("translated: "+description)
49
 
50
+ JKLAS = os.environ['OPENAI-KEY']
51
  dalle = Dalle2(JKLAS)
52
  generations = dalle.generate(description)
53
  img_list = []