Commit
·
962af02
1
Parent(s):
bd1837a
Update app.py
Browse files
app.py
CHANGED
@@ -64,7 +64,7 @@ def translate(api_key, input_text, inputs_transStyle):
|
|
64 |
if input_text is None or input_text == "":
|
65 |
return "System prompt: There is no content to translate!"
|
66 |
|
67 |
-
prompt = f"
|
68 |
response = model.generate_content([prompt, input_text])
|
69 |
return response.text
|
70 |
|
@@ -138,4 +138,4 @@ def main():
|
|
138 |
ocr_tr.launch(inbrowser=True)
|
139 |
|
140 |
if __name__ == '__main__':
|
141 |
-
main()
|
|
|
64 |
if input_text is None or input_text == "":
|
65 |
return "System prompt: There is no content to translate!"
|
66 |
|
67 |
+
prompt = f"In the translation, ensure that no content is repeated and original meaning and context are preserved as much as possible. Reformat the following article to have clear paragraph breaks and correct punctuation. Then, translate it into {inputs_transStyle}, ensuring that the original meaning and context are preserved as much as possible."
|
68 |
response = model.generate_content([prompt, input_text])
|
69 |
return response.text
|
70 |
|
|
|
138 |
ocr_tr.launch(inbrowser=True)
|
139 |
|
140 |
if __name__ == '__main__':
|
141 |
+
main()
|