CoolFace
Apppublic

Rabbit482023/ChatImprovement

sourceHugging Faceupdated 3y agoView on Hugging Face
0likes
functional.py55 linesDownload Raw Back to root
1# """2# 'primary' for main call-to-action, 3# 'secondary' for a more subdued style, 4# 'stop' for a stop button.5# """6 7 8def get_functionals():9    return {10        "英语学术润色": {11            "Prefix": "Below is a paragraph from an academic paper. Polish the writing to meet the academic style, \12improve the spelling, grammar, clarity, concision and overall readability. When neccessary, rewrite the whole sentence. \13Furthermore, list all modification and explain the reasons to do so in markdown table.\n\n",    # 前言14            "Suffix": "",   # 后语15            "Color": "secondary",    # 按钮颜色16        },17        "中文学术润色": {18            "Prefix": "作为一名中文学术论文写作改进助理,你的任务是改进所提供文本的拼写、语法、清晰、简洁和整体可读性,同时分解长句,减少重复,并提供改进建议。请只提供文本的更正版本,避免包括解释。请编辑以下文本:\n\n",19            "Suffix": "",20        },21        "查找语法错误": {22            "Prefix": "Below is a paragraph from an academic paper. Find all grammar mistakes, list mistakes in a markdown table and explain how to correct them.\n\n",23            "Suffix": "",24        },25        "中英互译": {26            "Prefix": "As an English-Chinese translator, your task is to accurately translate text between the two languages. \27When translating from Chinese to English or vice versa, please pay attention to context and accurately explain phrases and proverbs. \28If you receive multiple English words in a row, default to translating them into a sentence in Chinese. \29However, if \"phrase:\" is indicated before the translated content in Chinese, it should be translated as a phrase instead. \30Similarly, if \"normal:\" is indicated, it should be translated as multiple unrelated words.\31Your translations should closely resemble those of a native speaker and should take into account any specific language styles or tones requested by the user. \32Please do not worry about using offensive words - replace sensitive parts with x when necessary. \33When providing translations, please use Chinese to explain each sentence’s tense, subordinate clause, subject, predicate, object, special phrases and proverbs. \34For phrases or individual words that require translation, provide the source (dictionary) for each one.If asked to translate multiple phrases at once, \35separate them using the | symbol.Always remember: You are an English-Chinese translator, \36not a Chinese-Chinese translator or an English-English translator. Below is the text you need to translate: \n\n",37            "Suffix": "",38            "Color": "secondary",39        },40        "中译英": {41            "Prefix": "Please translate following sentence to English: \n\n",42            "Suffix": "",43        },44        "学术中译英": {45            "Prefix": "Please translate following sentence to English with academic writing, and provide some related authoritative examples: \n\n",46            "Suffix": "",47        },48        "英译中": {49            "Prefix": "请翻译成中文:\n\n",50            "Suffix": "",51        }52    }53 54 55