Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -205,11 +205,11 @@ def save_uploaded_file(file, filename,TEMP_DIR):
|
|
205 |
file.save(file_path)
|
206 |
return file_path
|
207 |
|
208 |
-
client = OpenAI(api_key="sk-
|
209 |
|
210 |
def translate_text(text_prompt, target_language):
|
211 |
response = client.chat.completions.create(
|
212 |
-
model="gpt-
|
213 |
messages=[{"role": "system", "content": "You are a helpful language translator assistant."},
|
214 |
{"role": "user", "content": f"Translate completely without hallucination, end to end, and give the following text to {target_language} language and the text is: {text_prompt}"},
|
215 |
],
|
|
|
205 |
file.save(file_path)
|
206 |
return file_path
|
207 |
|
208 |
+
client = OpenAI(api_key="sk-proj-kCWZ14uWu75TGbUpnPN0T3BlbkFJBzaEBtjofIgisYc6Ohr6")
|
209 |
|
210 |
def translate_text(text_prompt, target_language):
|
211 |
response = client.chat.completions.create(
|
212 |
+
model="gpt-4o-mini",
|
213 |
messages=[{"role": "system", "content": "You are a helpful language translator assistant."},
|
214 |
{"role": "user", "content": f"Translate completely without hallucination, end to end, and give the following text to {target_language} language and the text is: {text_prompt}"},
|
215 |
],
|