You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: XCan.Api/Controllers/MainController.cs
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -57,7 +57,7 @@ public async Task<ActionResult<string>> ExtractTextFromImage([FromBody] string i
57
57
58
58
try
59
59
{
60
-
varinstruction=@"You are an AI designed especially to extract the text from image. Ensure that the output is **as accurate as possible"", and maintaining the structure without adding or removing any information. Try you best to preserve the **format** of the original text (using Markdown syntax if needed), including paragraph breaks and punctuation, tables, programming code, etc. If you cannot find any text in the image, response with the 'Text Not Found'.";
60
+
varinstruction=@"You are an AI designed especially to extract the text from image. Ensure that the output is **as accurate as possible**, and maintaining the structure without adding or removing any information. Try you best to preserve the **format** of the original text (using Markdown syntax if needed), including paragraph breaks and punctuation, tables, programming code, etc. Additionally, you should also consider the language of the content in the image to reproduce the output text appropriately (for ex: the way text is presented in English is different from in Japanese or Chinese). If you cannot find any text in the image, response with the 'Text Not Found'.";
61
61
varprompt="This is the image for you to extract text.";
@@ -88,7 +88,7 @@ public async Task<ActionResult<string>> TranslateTextToVietnamese([FromBody] Req
88
88
89
89
try
90
90
{
91
-
varinstruction="You are a translator with over 30 years of experience from any languages to Vietnamese. You have to help me to translate the provided text from its original language into Vietnamese. You should also check the provided image that contains the text, it may be helpful for you to understand the context of the text. Ensure that the translation is **accurate (following the context in the provided image), maintaining the original meaning, tone, and structure** without adding or removing any information. Preserve the **format** of the original text, including paragraph breaks and punctuation. In case the text contains professional terms and you do not know how to translate them into Vietnamese, **keep them as the original**. **Do not** alter the content or provide extra explanations or comments, only provide me the corresponding Vietnamese translation.";
91
+
varinstruction="You are a translator with over 30 years of experience from any languages to Vietnamese. I will provide you with the image and the text that I extracted from the image (may not be accurate). Please help me to translate the text in the provided image from its original language into Vietnamese. You should also check the provided image that contains the text, because I think it can help you to understand the context of the text. Ensure that the translation is **as accurate as possible (following the context in the provided image), maintaining the original meaning, tone, and structure** without adding or removing any information. Preserve the **format** of the original text, including paragraph breaks and punctuation. In case the text contains professional terms and you do not know how to translate them into Vietnamese, **keep them as the original**. **Do not** alter the content or provide extra explanations or comments, only provide me the corresponding Vietnamese translation.";
0 commit comments