Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -25,9 +25,9 @@ def translate_to_japanese(api_key, text):
|
|
25 |
try:
|
26 |
# Call the OpenAI API to get the Japanese translation
|
27 |
response_translation = openai.ChatCompletion.create(
|
28 |
-
model="gpt-
|
29 |
messages=messages_translation,
|
30 |
-
max_tokens=
|
31 |
temperature=0.5
|
32 |
)
|
33 |
|
|
|
25 |
try:
|
26 |
# Call the OpenAI API to get the Japanese translation
|
27 |
response_translation = openai.ChatCompletion.create(
|
28 |
+
model="gpt-4o", # Use the correct endpoint for chat models
|
29 |
messages=messages_translation,
|
30 |
+
max_tokens=300,
|
31 |
temperature=0.5
|
32 |
)
|
33 |
|