Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -53,8 +53,10 @@ Your task is to analyze in depth the phenotype and effective prevention of {name
|
|
| 53 |
resp_text = "Note: The following content is generated by the GPT-4 Turbo driven by Prompt Engineering\n" + resp_text
|
| 54 |
|
| 55 |
# 在普通文本框不能用 "**" 渲染加粗,Markdown 才可以。因此,将输入字符串中所有的 "**" 替换为 ""。
|
| 56 |
-
|
| 57 |
-
|
|
|
|
|
|
|
| 58 |
|
| 59 |
except Exception as e:
|
| 60 |
print(str(e), "Response Error")
|
|
@@ -63,7 +65,7 @@ Your task is to analyze in depth the phenotype and effective prevention of {name
|
|
| 63 |
return output1, output2
|
| 64 |
|
| 65 |
|
| 66 |
-
# 33 种癌症类型
|
| 67 |
project_name_TCGA = {
|
| 68 |
"TCGA-ACC": ["adrenocortical carcinoma", "肾上腺皮质癌"],
|
| 69 |
"TCGA-BLCA": ["bladder urothelial carcinoma", "膀胱尿路上皮癌"],
|
|
@@ -116,12 +118,12 @@ project_name_TCGA = {
|
|
| 116 |
desc = """<h1 align="center" style="font-family: KaiTi, sans-serif; font-size: 22px; color: #00FF7F;">🎉 TCGA 项目涉及的所有癌症类型的缩写、中英文全称和描述 🧬</h1>"""
|
| 117 |
outputs = [
|
| 118 |
gr.Textbox(
|
| 119 |
-
label="🔎 1. 您查询的 TCGA 项目的癌症类型的
|
| 120 |
), # 1. The Full Name of The Cancer Type Queried.
|
| 121 |
-
gr.
|
| 122 |
label="👩⚕️ 2. 快速了解您查询的这种癌症类型",
|
| 123 |
show_copy_button=True,
|
| 124 |
-
)
|
| 125 |
]
|
| 126 |
my_demo = gr.Interface(
|
| 127 |
fn=demo,
|
|
|
|
| 53 |
resp_text = "Note: The following content is generated by the GPT-4 Turbo driven by Prompt Engineering\n" + resp_text
|
| 54 |
|
| 55 |
# 在普通文本框不能用 "**" 渲染加粗,Markdown 才可以。因此,将输入字符串中所有的 "**" 替换为 ""。
|
| 56 |
+
if "**" in resp_text:
|
| 57 |
+
output2 = resp_text.replace("**", "")
|
| 58 |
+
if "#" in resp_text:
|
| 59 |
+
output2 = resp_text.replace("#", "")
|
| 60 |
|
| 61 |
except Exception as e:
|
| 62 |
print(str(e), "Response Error")
|
|
|
|
| 65 |
return output1, output2
|
| 66 |
|
| 67 |
|
| 68 |
+
# TCGA 有 33 种癌症类型
|
| 69 |
project_name_TCGA = {
|
| 70 |
"TCGA-ACC": ["adrenocortical carcinoma", "肾上腺皮质癌"],
|
| 71 |
"TCGA-BLCA": ["bladder urothelial carcinoma", "膀胱尿路上皮癌"],
|
|
|
|
| 118 |
desc = """<h1 align="center" style="font-family: KaiTi, sans-serif; font-size: 22px; color: #00FF7F;">🎉 TCGA 项目涉及的所有癌症类型的缩写、中英文全称和描述 🧬</h1>"""
|
| 119 |
outputs = [
|
| 120 |
gr.Textbox(
|
| 121 |
+
label="🔎 1. 您查询的 TCGA 项目的癌症类型的名称", show_copy_button=True
|
| 122 |
), # 1. The Full Name of The Cancer Type Queried.
|
| 123 |
+
gr.Textbox(
|
| 124 |
label="👩⚕️ 2. 快速了解您查询的这种癌症类型",
|
| 125 |
show_copy_button=True,
|
| 126 |
+
) # 2. Insight Into The Cancer Type Being Queried. A Quick Look At The Cancer Type Being Queried
|
| 127 |
]
|
| 128 |
my_demo = gr.Interface(
|
| 129 |
fn=demo,
|