Liusuthu commited on
Commit
7315adc
·
verified ·
1 Parent(s): e926da5

Update consult_func.py

Browse files
Files changed (1) hide show
  1. consult_func.py +13 -2
consult_func.py CHANGED
@@ -444,7 +444,18 @@ def get_info(radio1,radio2,radio3,radio4,radio5,radio6,result1,text1,radio8,radi
444
  ans_score=result1
445
  ans_text=text1
446
  #radio8,radio9,radio10自杀情况
447
- suicide="自杀内容"
 
 
 
 
 
 
 
 
 
 
 
448
  #兴趣分数与内容
449
  hobby_score=result2
450
  hobby_text=text2
@@ -452,7 +463,7 @@ def get_info(radio1,radio2,radio3,radio4,radio5,radio6,result1,text1,radio8,radi
452
  recent_score=result3
453
  recent_text=text3
454
  #adv总结建议
455
- advice=adv
456
 
457
 
458
  data=[sleep,eat,mood,ans_score,ans_text,suicide,hobby_score,hobby_text,recent_score,recent_text,advice]
 
444
  ans_score=result1
445
  ans_text=text1
446
  #radio8,radio9,radio10自杀情况
447
+ if radio8==1:
448
+ suicide="没想过死"
449
+ elif radio 9==1:
450
+ suicide="想过死,但没想过怎么死"
451
+ elif radio10=="没想过":
452
+ suicide="想过死,也想过怎么死,但没有具体想过"
453
+ elif radio10=="想过,没想过具体时间和地点":
454
+ suicide="想过死,也想过具体的做法,但没想过具体时间和地点"
455
+ elif radio10=="想过具体做法,时间和地点,没实践过":
456
+ suicide="想过死的具体做法、时间和地点,但是没实践过"
457
+ else:
458
+ suicide="尝试自杀过"
459
  #兴趣分数与内容
460
  hobby_score=result2
461
  hobby_text=text2
 
463
  recent_score=result3
464
  recent_text=text3
465
  #adv总结建议
466
+ advice="adv"
467
 
468
 
469
  data=[sleep,eat,mood,ans_score,ans_text,suicide,hobby_score,hobby_text,recent_score,recent_text,advice]