Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -89,7 +89,7 @@ def translate_to_english(api_key, text, lang_code):
|
|
89 |
prompt = f"Translate the following text from {lang_code} to English: \n\n{text}"
|
90 |
|
91 |
response = openai.ChatCompletion.create(
|
92 |
-
model="gpt-
|
93 |
messages=[
|
94 |
{"role": "system", "content": "You are a helpful assistant that translates text."},
|
95 |
{"role": "user", "content": prompt}
|
|
|
89 |
prompt = f"Translate the following text from {lang_code} to English: \n\n{text}"
|
90 |
|
91 |
response = openai.ChatCompletion.create(
|
92 |
+
model="gpt-4o", # Using ChatGPT model for translation
|
93 |
messages=[
|
94 |
{"role": "system", "content": "You are a helpful assistant that translates text."},
|
95 |
{"role": "user", "content": prompt}
|