ll7098ll commited on
Commit
72b588e
·
verified ·
1 Parent(s): 2f5ec67

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -79,12 +79,12 @@ def generate_relationship_scenario(people, relationship, situation):
79
  type_info = f"{person['name']} ({person['gender']}): {person['type']} ({enneagram_types.get(person['type'], '알 수 없는 유형')})"
80
 
81
  # 날개 유형 정보 추가 (값이 있고 빈 문자열이 아닌 경우에만)
82
- if person.get('wing') and person['wing'] != "" and person['wing'] != "없음": # "없음" 예외처리 추가
83
- wing_description = wing_types.get(person['wing'][0], '알 수 없는 날개 유형') # 날개 유형의 숫자 부분만 추출하여 설명 가져옴
84
  type_info += f" 날개: {person['wing']} ({wing_description})"
85
 
86
  # 본능 유형 정보 추가 (값이 있고 빈 문자열이 아닌 경우에만)
87
- if person.get('instinct') and person['instinct'] != "" and person['instinct'] != "없음": # "없음" 예외처리 추가
88
  type_info += f", 본능: {person['instinct']} ({instinct_variants.get(person['instinct'], '알 수 없는 본능 유형')})"
89
 
90
  return type_info
 
79
  type_info = f"{person['name']} ({person['gender']}): {person['type']} ({enneagram_types.get(person['type'], '알 수 없는 유형')})"
80
 
81
  # 날개 유형 정보 추가 (값이 있고 빈 문자열이 아닌 경우에만)
82
+ if person.get('wing') and person['wing'] not in ["", "없음"]:
83
+ wing_description = wing_types.get(person['wing'][0], '알 수 없는 날개 유형')
84
  type_info += f" 날개: {person['wing']} ({wing_description})"
85
 
86
  # 본능 유형 정보 추가 (값이 있고 빈 문자열이 아닌 경우에만)
87
+ if person.get('instinct') and person['instinct'] not in ["", "없음"]:
88
  type_info += f", 본능: {person['instinct']} ({instinct_variants.get(person['instinct'], '알 수 없는 본능 유형')})"
89
 
90
  return type_info