Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -211,7 +211,7 @@ 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 |
],
|
216 |
max_tokens = len(text_prompt) + 200 # Use the length of the input text
|
217 |
# temperature=0.3,
|
|
|
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 the ouput should just be the translation of the text prompt and nothing else, and give the following text to {target_language} language and the text is: {text_prompt}"},
|
215 |
],
|
216 |
max_tokens = len(text_prompt) + 200 # Use the length of the input text
|
217 |
# temperature=0.3,
|