Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -55,21 +55,21 @@ Let's think step by step.
|
|
| 55 |
presence_penalty=0.20,
|
| 56 |
frequency_penalty=0.20,
|
| 57 |
)
|
|
|
|
| 58 |
resp_text = chat_completion.choices[0].message.content.strip()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
|
| 60 |
if output_language == "Chinese":
|
| 61 |
output2 = "🤖 请注意:以下内容通过提示工程驱动的 GPT-4 Turbo 生成\n\n" + resp_text
|
| 62 |
else:
|
| 63 |
output2 = "🤖 Note: The following content is generated by the GPT-4 Turbo driven by Prompt Engineering\n\n" + resp_text
|
| 64 |
|
| 65 |
-
# 在普通文本框不能用 "**" 渲染加粗,Markdown 才可以。因此,将输入字符串中所有的 "**" 替换为 ""。
|
| 66 |
-
# if "**" in resp_text:
|
| 67 |
-
# output2 = resp_text.replace("**", "")
|
| 68 |
-
# if "# " in resp_text:
|
| 69 |
-
# output2 = resp_text.replace("# ", "")
|
| 70 |
-
# if "#" in resp_text:
|
| 71 |
-
# output2 = resp_text.replace("#", "")
|
| 72 |
-
|
| 73 |
except Exception as e:
|
| 74 |
print(str(e), "Response Error")
|
| 75 |
return output1, "Response Error"
|
|
@@ -127,6 +127,7 @@ project_name_TCGA = {
|
|
| 127 |
# 支持 Markdown 和 HTML 内容格式:
|
| 128 |
# Abbreviations, Full Names and Descriptions of All Cancer Types Covered by TCGA Project.
|
| 129 |
# desc = """<h1 align="center" style="font-family: Latin Modern Math, sans-serif; font-size: 22px; color: #00FF7F;">🎉 Abbreviations, Full Names and Descriptions of All Cancer Types Covered by TCGA Project 🧬</h1>"""
|
|
|
|
| 130 |
desc = """<h1 align="center" style="font-family: KaiTi, sans-serif; font-size: 22px; color: #00FF7F;">🎉 TCGA 项目涉及的所有癌症类型的缩写、中英文全称和描述 🧬</h1>"""
|
| 131 |
outputs = [
|
| 132 |
gr.Textbox(
|
|
|
|
| 55 |
presence_penalty=0.20,
|
| 56 |
frequency_penalty=0.20,
|
| 57 |
)
|
| 58 |
+
|
| 59 |
resp_text = chat_completion.choices[0].message.content.strip()
|
| 60 |
+
# 在普通文本框不能用 "**" 渲染加粗,Markdown 才可以。因此,将输入字符串中所有的 "**" 替换为 ""。
|
| 61 |
+
# if "**" in resp_text:
|
| 62 |
+
# resp_text = resp_text.replace("**", "")
|
| 63 |
+
# if "# " in resp_text:
|
| 64 |
+
# resp_text = resp_text.replace("# ", "")
|
| 65 |
+
# if "#" in resp_text:
|
| 66 |
+
# resp_text = resp_text.replace("#", "")
|
| 67 |
|
| 68 |
if output_language == "Chinese":
|
| 69 |
output2 = "🤖 请注意:以下内容通过提示工程驱动的 GPT-4 Turbo 生成\n\n" + resp_text
|
| 70 |
else:
|
| 71 |
output2 = "🤖 Note: The following content is generated by the GPT-4 Turbo driven by Prompt Engineering\n\n" + resp_text
|
| 72 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
except Exception as e:
|
| 74 |
print(str(e), "Response Error")
|
| 75 |
return output1, "Response Error"
|
|
|
|
| 127 |
# 支持 Markdown 和 HTML 内容格式:
|
| 128 |
# Abbreviations, Full Names and Descriptions of All Cancer Types Covered by TCGA Project.
|
| 129 |
# desc = """<h1 align="center" style="font-family: Latin Modern Math, sans-serif; font-size: 22px; color: #00FF7F;">🎉 Abbreviations, Full Names and Descriptions of All Cancer Types Covered by TCGA Project 🧬</h1>"""
|
| 130 |
+
|
| 131 |
desc = """<h1 align="center" style="font-family: KaiTi, sans-serif; font-size: 22px; color: #00FF7F;">🎉 TCGA 项目涉及的所有癌症类型的缩写、中英文全称和描述 🧬</h1>"""
|
| 132 |
outputs = [
|
| 133 |
gr.Textbox(
|