Spanicin commited on
Commit
b07f9ec
1 Parent(s): 14622e1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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="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")
209
 
210
  def translate_text(text_prompt, target_language):
211
  response = client.chat.completions.create(
212
- model="gpt-4-0125-preview",
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
  ],