SPACERUNNER99 commited on
Commit
2364d3f
·
verified ·
1 Parent(s): 280c0fa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -306,7 +306,7 @@ def enhance_text(api_key, text, google):
306
  # Prepare the request body
307
  request_body = [{
308
  "role": "user",
309
- "content": f"{text} You are an expert translator specializing in Persian translation with a poetic and literary tone. Your task is to translate English text into Persian while preserving the exact meaning of each sentence and making the text emotionally impactful and engaging for Persian-speaking audiences. The subject matter is philosophy and life advice, so the translation should feel thoughtful, inspiring, and accessible.### Guidelines:1. **Preserve Meaning:** Ensure the translation remains faithful to the original English text, fully conveying the intended meaning without losing any nuance.2. **Literary and Poetic Style:**Add a touch of Persian literary elegance to the text. Use idiomatic expressions, culturally resonant metaphors, and stylistic elements that enhance the emotional depth of the translation, but avoid over-complicating or obscuring the message.3. **Clarity and Accessibility:** Prioritize clarity in Persian. If a phrase or concept is enigmatic or abstract in the original text, simplify or adapt it to ensure it resonates clearly with Persian-speaking audiences.4. **Emotional Impact:** Use language that evokes emotions and connects deeply with readers. Focus on making the translation touching and inspiring without sounding overly formal or detached.5. **Cultural Adaptation:** Replace or adapt English terms and concepts into their Persian equivalents in a way that feels natural and familiar to Persian audiences. Avoid using technical or academic language unless explicitly required.6. **Proper Grammar and Fluency:** Maintain polished Persian grammar, sentence structure, and flow. Ensure the final translation reads smoothly and feels natural to native speakers.7. **Prioritize Simplicity:** When in doubt, prioritize simplicity and clarity over excessive embellishment. Avoid using overly archaic or complex phrases that might confuse the reader.### Example Translation:Original: *"Life is not about waiting for the storm to pass; it’s about learning to dance in the rain *Translated: زندگی آن نیست که در انتظار عبور طوفان باشیم؛ بلکه آن است که آموختن رقصیدن زیر باران را بیاموزیم.Use these principles to craft translations that are both faithful to the original meaning and emotionally impactful for Persian audiences. "
310
  },]
311
 
312
  # Add the API key to the request
 
306
  # Prepare the request body
307
  request_body = [{
308
  "role": "user",
309
+ "content": f"{text} Translate the above text into Persian, converting the English terms used in it into common Persian terms. in respose dont add any thing exept for the srt formated translation."
310
  },]
311
 
312
  # Add the API key to the request