Update app.py
Browse files
app.py
CHANGED
@@ -144,8 +144,17 @@ def enhance_text(api_key, text):
|
|
144 |
# Prepare the request body
|
145 |
request_body = [{
|
146 |
"role": "user",
|
147 |
-
"content": f"
|
148 |
-
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
|
150 |
# Add the API key to the request
|
151 |
headers = {
|
|
|
144 |
# Prepare the request body
|
145 |
request_body = [{
|
146 |
"role": "user",
|
147 |
+
"content": f"Please take the following SRT subtitle text in English and translate only the subtitle text into Persian. Ensure that all numbering and time codes remain unchanged. The output should be a new SRT file with the subtitles in Persian, preserving the original formatting and timings and exept for the subtitle dont return anything in response. the subtitle will be provided in the following message"
|
148 |
+
},
|
149 |
+
{
|
150 |
+
"role": "assistant",
|
151 |
+
"content": "okay"
|
152 |
+
},
|
153 |
+
{
|
154 |
+
"role": "user",
|
155 |
+
"content": text
|
156 |
+
}
|
157 |
+
]
|
158 |
|
159 |
# Add the API key to the request
|
160 |
headers = {
|