Update app.py
Browse files
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 = '
|
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 = '
|
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 = []
|