kavehtaheri commited on
Commit
dafb74c
·
verified ·
1 Parent(s): 8833d57

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -1
app.py CHANGED
@@ -373,8 +373,17 @@ def enhance_text(api_key, text):
373
  # Prepare the request body
374
  request_body = [{
375
  "role": "user",
376
- "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."
377
  },]
 
 
 
 
 
 
 
 
 
378
 
379
  # Add the API key to the request
380
  headers = {
 
373
  # Prepare the request body
374
  request_body = [{
375
  "role": "user",
376
+ "content": "Translate the following English text into Persian, specifically for a voice-over. Prioritize a natural and engaging tone that resonates with a Persian-speaking audience. Make sure the translation is:Concise and Time-Conscious: It needs to be spoken fluently within approximately the same time it takes to say the original English. Avoid overly verbose phrasing.Clear and Understandable: Use vocabulary and sentence structures that are easily understood by a general Persian-speaking audience. Avoid jargon or overly technical terms unless absolutely necessary and always provide a culturally appropriate equivalent.Culturally Relevant: Adapt the translation to ensure it is culturally appropriate and resonates with Iranian sensibilities. Consider nuances of politeness, humor, and common expressions. Adapt phrases as necessary to better reflect the culture.Natural Sounding: Read the Persian translation aloud to ensure it sounds natural and flows well when spoken.Engaging: Use phrasing that keeps the listener interested and attentive. Consider using rhetorical devices or active voice where appropriate to make the delivery more impactful.[Optional: Include the intended audience demographics here, e.g., "Targeting a younger audience" or "Intended for a professional context". This helps tailor the language.][Optional: Mention the overall tone you're aiming for, e.g., "maintain a formal tone" or "use an informal and friendly tone".]Essentially, I need a translation that doesn't sound like a translation, but a message written originally in Persian that is easy to grasp and will keep the audience captivated.the text will send in next message .
377
  },]
378
+ {
379
+ "role": "assistant",
380
+ "content": "okay"
381
+ },
382
+ {
383
+ "role": "user",
384
+ "content": text
385
+ }
386
+ ]
387
 
388
  # Add the API key to the request
389
  headers = {