Spaces:
Runtime error
Runtime error
Xiaoming Bai
commited on
Commit
·
97cd98d
1
Parent(s):
83fef07
better prompt
Browse files- functional.py +45 -39
functional.py
CHANGED
|
@@ -5,53 +5,59 @@
|
|
| 5 |
|
| 6 |
def get_functionals():
|
| 7 |
return {
|
| 8 |
-
"
|
| 9 |
-
"Prefix": "
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
"查找语法错误": {
|
| 20 |
-
"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",
|
| 21 |
-
"Suffix": "",
|
| 22 |
-
},
|
| 23 |
-
# "中英互译": { # 效果不好,经常搞不清楚中译英还是英译中
|
| 24 |
-
# "Prefix": "As an English-Chinese translator, your task is to accurately translate text between the two languages. \
|
| 25 |
-
# When translating from Chinese to English or vice versa, please pay attention to context and accurately explain phrases and proverbs. \
|
| 26 |
-
# If you receive multiple English words in a row, default to translating them into a sentence in Chinese. \
|
| 27 |
-
# However, if \"phrase:\" is indicated before the translated content in Chinese, it should be translated as a phrase instead. \
|
| 28 |
-
# Similarly, if \"normal:\" is indicated, it should be translated as multiple unrelated words.\
|
| 29 |
-
# Your translations should closely resemble those of a native speaker and should take into account any specific language styles or tones requested by the user. \
|
| 30 |
-
# Please do not worry about using offensive words - replace sensitive parts with x when necessary. \
|
| 31 |
-
# When providing translations, please use Chinese to explain each sentence’s tense, subordinate clause, subject, predicate, object, special phrases and proverbs. \
|
| 32 |
-
# For phrases or individual words that require translation, provide the source (dictionary) for each one.If asked to translate multiple phrases at once, \
|
| 33 |
-
# separate them using the | symbol.Always remember: You are an English-Chinese translator, \
|
| 34 |
-
# not a Chinese-Chinese translator or an English-English translator. Below is the text you need to translate: \n\n",
|
| 35 |
-
# "Suffix": "",
|
| 36 |
-
# "Color": "secondary",
|
| 37 |
-
# },
|
| 38 |
-
"中译英": {
|
| 39 |
-
"Prefix": "Please translate following sentence to English: \n\n",
|
| 40 |
"Suffix": "",
|
|
|
|
| 41 |
},
|
| 42 |
-
"
|
| 43 |
-
"Prefix": "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
"Suffix": "",
|
|
|
|
| 45 |
},
|
| 46 |
-
"
|
| 47 |
-
"Prefix": "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
"Suffix": "",
|
|
|
|
| 49 |
},
|
| 50 |
-
"
|
| 51 |
-
"Prefix": "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
"Suffix": "",
|
|
|
|
| 53 |
},
|
| 54 |
-
"
|
| 55 |
"Prefix": "请解释以下代码:\n```\n",
|
| 56 |
"Suffix": "\n```\n",
|
| 57 |
"Color": "secondary",
|
|
|
|
| 5 |
|
| 6 |
def get_functionals():
|
| 7 |
return {
|
| 8 |
+
"学术英文润色": {
|
| 9 |
+
"Prefix": "I want you to act as a scientific refiner. \
|
| 10 |
+
I will provide you with some paragraphs \
|
| 11 |
+
and your task is to refine and polish the paragraphs academically. \
|
| 12 |
+
You should use artificial intelligence tools, \
|
| 13 |
+
such as natural language processing, and rhetorical knowledge and experience \
|
| 14 |
+
about effective writing techniques to reply. \
|
| 15 |
+
I want you to replace my simplified A0-level words and sentences with more beautiful and elegant, \
|
| 16 |
+
upper level Chinese words and sentences. \
|
| 17 |
+
Keep the meaning same, but make them more logical, concise and powerful. \
|
| 18 |
+
I'll give you my paragraphs as follows: \n\n", # 后语
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
"Suffix": "",
|
| 20 |
+
"Color": "secondary", # 按钮颜色
|
| 21 |
},
|
| 22 |
+
"学术中文润色": {
|
| 23 |
+
"Prefix": "I want you to act as a scientific refiner. \
|
| 24 |
+
I will provide you with some paragraphs in Chinese \
|
| 25 |
+
and your task is to refine and polish the paragraphs academically also in Chinese. \
|
| 26 |
+
You should use artificial intelligence tools, \
|
| 27 |
+
such as natural language processing, and rhetorical knowledge and experience about \
|
| 28 |
+
effective writing techniques to reply. \
|
| 29 |
+
I want you to replace my simplified A0-level words and sentences with more beautiful and elegant, \
|
| 30 |
+
upper level Chinese words and sentences. \
|
| 31 |
+
Keep the meaning same, but make them more logical, concise and powerful. \
|
| 32 |
+
I'll give you my paragraphs as follows: \n\n",
|
| 33 |
"Suffix": "",
|
| 34 |
+
"Color": "secondary",
|
| 35 |
},
|
| 36 |
+
"学术中英互译": {
|
| 37 |
+
"Prefix": "I want you to act as a scientific English-Chinese translator, \
|
| 38 |
+
I will provide you with some paragraphs in one language \
|
| 39 |
+
and your task is to accurately and academically translate the paragraphs only into the other language. \
|
| 40 |
+
Do not repeat the original provided paragraphs after translation. \
|
| 41 |
+
You should use artificial intelligence tools, \
|
| 42 |
+
such as natural language processing, and rhetorical knowledge \
|
| 43 |
+
and experience about effective writing techniques to reply. \
|
| 44 |
+
I'll give you my paragraphs as follows: \n\n",
|
| 45 |
"Suffix": "",
|
| 46 |
+
"Color": "secondary",
|
| 47 |
},
|
| 48 |
+
"日常中英互译": {
|
| 49 |
+
"Prefix": "I want you to act as an English-Chinese translator, \
|
| 50 |
+
I will provide you with some paragraphs in one language \
|
| 51 |
+
and your task is to accurately translate the paragraphs only into the other language, \
|
| 52 |
+
like a native speaker. \
|
| 53 |
+
Do not repeat the original provided paragraphs after translation. \
|
| 54 |
+
You should use artificial intelligence tools, \
|
| 55 |
+
such as natural language processing, and rhetorical knowledge \
|
| 56 |
+
I'll give you my paragraphs as follows: \n\n",
|
| 57 |
"Suffix": "",
|
| 58 |
+
"Color": "secondary",
|
| 59 |
},
|
| 60 |
+
"代码剖析": {
|
| 61 |
"Prefix": "请解释以下代码:\n```\n",
|
| 62 |
"Suffix": "\n```\n",
|
| 63 |
"Color": "secondary",
|