Spaces:
Sleeping
Sleeping
capradeepgujaran
commited on
Commit
•
e9c72ea
1
Parent(s):
5c94f26
Update openai_tts_tool.py
Browse files- openai_tts_tool.py +1 -1
openai_tts_tool.py
CHANGED
@@ -35,7 +35,7 @@ def translate_text(api_key, text, target_language):
|
|
35 |
logging.info("Starting translation process.")
|
36 |
client = OpenAI(api_key=api_key)
|
37 |
prompt = f"Translate the following text to {target_language}:\n\n{text}"
|
38 |
-
response = client.completions.create(
|
39 |
model="gpt-4o-mini", # Updated model name
|
40 |
prompt=prompt,
|
41 |
max_tokens=1000,
|
|
|
35 |
logging.info("Starting translation process.")
|
36 |
client = OpenAI(api_key=api_key)
|
37 |
prompt = f"Translate the following text to {target_language}:\n\n{text}"
|
38 |
+
response = client.chat.completions.create(
|
39 |
model="gpt-4o-mini", # Updated model name
|
40 |
prompt=prompt,
|
41 |
max_tokens=1000,
|