Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ def translate(text, language):
|
|
13 |
message_text = [{"role":"system","content":f"You are an AI translator that translates documents to {language}. Do not put anything before or after the text you want to translate. Just return the translated text. At the end of your translation generate a table of important information that could be helpful for quick identification by a human (this section should be in english).: \n \n Text to Translate: {text}"}]
|
14 |
# Create a completion request to Azure OpenAI
|
15 |
completion = openai.ChatCompletion.create(
|
16 |
-
engine="gpt-4
|
17 |
messages = message_text,
|
18 |
temperature=0,
|
19 |
max_tokens=4000,
|
|
|
13 |
message_text = [{"role":"system","content":f"You are an AI translator that translates documents to {language}. Do not put anything before or after the text you want to translate. Just return the translated text. At the end of your translation generate a table of important information that could be helpful for quick identification by a human (this section should be in english).: \n \n Text to Translate: {text}"}]
|
14 |
# Create a completion request to Azure OpenAI
|
15 |
completion = openai.ChatCompletion.create(
|
16 |
+
engine="gpt-4",
|
17 |
messages = message_text,
|
18 |
temperature=0,
|
19 |
max_tokens=4000,
|