Spaces:
Runtime error
Runtime error
Update consult_func.py
Browse files- consult_func.py +6 -4
consult_func.py
CHANGED
@@ -159,7 +159,7 @@ def advice4(radio5, text3_1, radio8, radio9, radio10):
|
|
159 |
|
160 |
|
161 |
def advice(
|
162 |
-
radio1, radio2, radio3, radio4, radio5, radio6, text3_1, radio8, radio9, radio10
|
163 |
):
|
164 |
# symptoms = ""
|
165 |
# if advice1(radio1, radio2, radio3) == "不存在" and advice2(radio4) == "不存在":
|
@@ -168,6 +168,8 @@ def advice(
|
|
168 |
# symptoms = "存在" + advice1(radio1, radio2, radio3) + "问题,不存在饮食问题且"
|
169 |
# if advice1(radio1, radio2, radio3) == "不存在" and advice2(radio4) != "不存在":
|
170 |
# symptoms = "不存在睡眠问题,存在" + advice2(radio4) + "问题且"
|
|
|
|
|
171 |
SLEEP = advice1(radio1, radio2, radio3)
|
172 |
EAT = advice2(radio4)
|
173 |
MOOD = advice3(radio5, radio6)
|
@@ -177,7 +179,7 @@ def advice(
|
|
177 |
这对于心理健康和人际互动都是非常有益的。此外,兴趣爱好也为个体提供了逃避日常压力和烦扰的机会,促使身心得到放松和恢复。
|
178 |
"""
|
179 |
RECENT = "可以看出你的近期情况不错,继续保持。"
|
180 |
-
SUMMARY = "
|
181 |
|
182 |
FINAL_ADVICE = """
|
183 |
<h1 style='text-align:center;'>检测报告</h1>
|
@@ -198,8 +200,8 @@ def advice(
|
|
198 |
|
199 |
return (
|
200 |
gr.Markdown(visible=True),
|
201 |
-
gr.
|
202 |
-
gr.
|
203 |
value=FINAL_ADVICE,
|
204 |
# "你"
|
205 |
# + symptoms
|
|
|
159 |
|
160 |
|
161 |
def advice(
|
162 |
+
radio1, radio2, radio3, radio4, radio5, radio6, text3_1, radio8, radio9, radio10,result1,result2,result3
|
163 |
):
|
164 |
# symptoms = ""
|
165 |
# if advice1(radio1, radio2, radio3) == "不存在" and advice2(radio4) == "不存在":
|
|
|
168 |
# symptoms = "存在" + advice1(radio1, radio2, radio3) + "问题,不存在饮食问题且"
|
169 |
# if advice1(radio1, radio2, radio3) == "不存在" and advice2(radio4) != "不存在":
|
170 |
# symptoms = "不存在睡眠问题,存在" + advice2(radio4) + "问题且"
|
171 |
+
score=result1+result2+result3
|
172 |
+
|
173 |
SLEEP = advice1(radio1, radio2, radio3)
|
174 |
EAT = advice2(radio4)
|
175 |
MOOD = advice3(radio5, radio6)
|
|
|
179 |
这对于心理健康和人际互动都是非常有益的。此外,兴趣爱好也为个体提供了逃避日常压力和烦扰的机会,促使身心得到放松和恢复。
|
180 |
"""
|
181 |
RECENT = "可以看出你的近期情况不错,继续保持。"
|
182 |
+
SUMMARY = "一次测量结果只是当下心理状态的反应,并不能代表你的长期状态。抑郁症症状因人而异,并不应当只以是否存在上述症状来判断,并且可能存在上述症状以外更个人化的症状。如果存在强烈的各种不适或者怀疑自己有抑郁症,建议及时去进行专业检查和干预治疗。最后,不论测试结果如何,都请你保持怀抱的心态接受接下来的每一天。也欢迎你多来拜访我们的APP,持续关注自己的健康状态,我们一直在这里等你~"
|
183 |
|
184 |
FINAL_ADVICE = """
|
185 |
<h1 style='text-align:center;'>检测报告</h1>
|
|
|
200 |
|
201 |
return (
|
202 |
gr.Markdown(visible=True),
|
203 |
+
gr.Number(value=score,visible=True),
|
204 |
+
gr.HTML(
|
205 |
value=FINAL_ADVICE,
|
206 |
# "你"
|
207 |
# + symptoms
|