Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -143,7 +143,7 @@ def enhance_text(api_key, text):
|
|
| 143 |
# Prepare the request body
|
| 144 |
request_body = [{
|
| 145 |
"role": "user",
|
| 146 |
-
"content": "
|
| 147 |
},
|
| 148 |
{
|
| 149 |
"role": "assistant",
|
|
|
|
| 143 |
# Prepare the request body
|
| 144 |
request_body = [{
|
| 145 |
"role": "user",
|
| 146 |
+
"content": "Instructions: You have received the following English SRT subtitle file for translation into Persian. **Your goal:** is to provide an accurate, fluent, and high-quality translation of this SRT file into Persian. **Context:** First, carefully analyze the English text to understand the content type (general, technical, colloquial, etc.) and its tone (formal, informal, serious, humorous, etc.). **Instructions & Steps:** 1. Review the English SRT file line by line. 2. Determine the content type and overall tone of the text. 3. Provide a Persian translation that accurately conveys the meaning of the English text and maintains an appropriate tone for a Persian-speaking audience. 4. **Response Format:** The output must be a Persian SRT file that precisely preserves the structure of the original English SRT file in terms of timestamps. **Constraints:** 1. The word count of each Persian subtitle should be as close as possible to the word count of the corresponding English subtitle to maintain a natural reading pace. 2. Do not alter the timestamp structure of the SRT file under any circumstances. 3. The translation must be grammatically and stylistically correct and fluent. **Behavior Setting:** The tone of the Persian translation should be consistent with the tone of the English text. If the English text is formal, the Persian translation should also be formal, and if it is informal, the Persian translation should also be informal and colloquial. **Negative Feedback:** Avoid literal and unnatural translations. The translation should be fluent and understandable to a native Persian speaker.**Iteration and Experimentation:** If necessary, review and revise the translation to achieve the best possible result."
|
| 147 |
},
|
| 148 |
{
|
| 149 |
"role": "assistant",
|