SPACERUNNER99 commited on
Commit
c4df0b5
·
verified ·
1 Parent(s): c1a7faa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -304,10 +304,10 @@ def enhance_text(api_key, text, google):
304
  url = "https://api.one-api.ir/chatbot/v1/gpt4o/"
305
 
306
  # Prepare the request body
307
- request_body = [{
308
  "role": "user",
309
  "content": f"{text} Please ignore all previous instructions. Please respond only in the Persian language.Do not explain what you are doing. Do not self reference.you arte an expert translator and your task here is to translte from english to persian The subject of the text is philosophy and life advice quote. The translation should have a poetic and literary tone in persian , Please follow these guidelines: Preserve the exact meaning of each sentence while adding a touch of Persian literary elegance. Keep the language clear and accessible, avoiding over-complicated or embellished phrases that alter the message. Ensure proper Persian grammar and structure for a polished, fluent result. Maintain alignment with the time ranges provided for subtitlesconvert the English terms used in it into common Persian terms which make the text undrastandabel and touching for persian audience .When in doubt, prioritize clarity and fidelity to the persian language structure over poetic embellis Translate it with the above considerations in summary you have to translate the text in a way beside is faitful loyality to the original text meaning it make it undrestandebel and touching for persian language auidence "
310
- },]
311
 
312
  # Add the API key to the request
313
  headers = {
 
304
  url = "https://api.one-api.ir/chatbot/v1/gpt4o/"
305
 
306
  # Prepare the request body
307
+ request_body = [{
308
  "role": "user",
309
  "content": f"{text} Please ignore all previous instructions. Please respond only in the Persian language.Do not explain what you are doing. Do not self reference.you arte an expert translator and your task here is to translte from english to persian The subject of the text is philosophy and life advice quote. The translation should have a poetic and literary tone in persian , Please follow these guidelines: Preserve the exact meaning of each sentence while adding a touch of Persian literary elegance. Keep the language clear and accessible, avoiding over-complicated or embellished phrases that alter the message. Ensure proper Persian grammar and structure for a polished, fluent result. Maintain alignment with the time ranges provided for subtitlesconvert the English terms used in it into common Persian terms which make the text undrastandabel and touching for persian audience .When in doubt, prioritize clarity and fidelity to the persian language structure over poetic embellis Translate it with the above considerations in summary you have to translate the text in a way beside is faitful loyality to the original text meaning it make it undrestandebel and touching for persian language auidence "
310
+ },]
311
 
312
  # Add the API key to the request
313
  headers = {