happyGPT commited on
Commit
a75646b
·
verified ·
1 Parent(s): 72620c2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -18,7 +18,7 @@ def demo(project_TCGA, output_language="Chinese"):
18
  output1 = f"✍️ Abbreviation: {project_TCGA}\n❤️ Full name in Chinese: {name_Chinese}\n💛 Full Name in English: {name_English}\n🔗 Link:{tcga_link}"
19
  system_instruction = f"You are an expert in the fields of systems biology, epidemiology, cancer research, and precision medicine, with deep insights into {name_English}."
20
  prompt_template = f"""
21
- Your task is to analyze in depth the phenotype and effective prevention of {name_English}, and to explore in depth the key molecular mechanisms and signaling pathways involved in its initiation and progression. Let's think step by step.
22
  """.strip()
23
 
24
  try:
@@ -47,10 +47,11 @@ Your task is to analyze in depth the phenotype and effective prevention of {name
47
  frequency_penalty=0.20,
48
  )
49
  resp_text = chat_completion.choices[0].message.content.strip()
 
50
  if output_language == "Chinese":
51
- resp_text = "请注意:以下内容通过提示工程驱动的 GPT-4 Turbo 生成\n\n" + resp_text
52
  else:
53
- resp_text = "Note: The following content is generated by the GPT-4 Turbo driven by Prompt Engineering\n\n" + resp_text
54
 
55
  # 在普通文本框不能用 "**" 渲染加粗,Markdown 才可以。因此,将输入字符串中所有的 "**" 替换为 ""。
56
  # if "**" in resp_text:
 
18
  output1 = f"✍️ Abbreviation: {project_TCGA}\n❤️ Full name in Chinese: {name_Chinese}\n💛 Full Name in English: {name_English}\n🔗 Link:{tcga_link}"
19
  system_instruction = f"You are an expert in the fields of systems biology, epidemiology, cancer research, and precision medicine, with deep insights into {name_English}."
20
  prompt_template = f"""
21
+ Your task is to analyze in depth the phenotypes and effective preventions of {name_English}, and to explore in depth the key molecular mechanisms and signaling pathways involved in its initiation and progression. Let's think step by step.
22
  """.strip()
23
 
24
  try:
 
47
  frequency_penalty=0.20,
48
  )
49
  resp_text = chat_completion.choices[0].message.content.strip()
50
+
51
  if output_language == "Chinese":
52
+ output2 = "请注意:以下内容通过提示工程驱动的 GPT-4 Turbo 生成\n\n" + resp_text
53
  else:
54
+ output2 = "Note: The following content is generated by the GPT-4 Turbo driven by Prompt Engineering\n\n" + resp_text
55
 
56
  # 在普通文本框不能用 "**" 渲染加粗,Markdown 才可以。因此,将输入字符串中所有的 "**" 替换为 ""。
57
  # if "**" in resp_text: