taeyeol commited on
Commit
af4d27d
Β·
verified Β·
1 Parent(s): c1d7a8d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -1
app.py CHANGED
@@ -44,11 +44,20 @@ questions = [
44
  "변화에 λŒ€ν•΄ μ–΄λ–»κ²Œ λ°˜μ‘ν•˜λ‚˜μš”?"
45
  ]
46
 
 
 
 
 
 
 
 
 
47
  # Gradio μ•± μ •μ˜
48
  with gr.Blocks() as app:
49
  gr.Markdown("# MBTI 진단 ν…ŒμŠ€νŠΈ")
50
  with gr.Row():
51
- answers = [gr.Radio(["μ˜΅μ…˜ 1", "μ˜΅μ…˜ 2", "μ˜΅μ…˜ 3", "μ˜΅μ…˜ 4"], label=question) for question in questions] # μ˜΅μ…˜ μΆ”κ°€
 
52
  submit_button = gr.Button("κ²°κ³Ό 보기")
53
  output_mbti, output_interpretation = gr.Textbox(label="λ‹Ήμ‹ μ˜ MBTI μœ ν˜•"), gr.Textbox(label="μœ ν˜• 해석 및 진단 ν…ŒμŠ€νŠΈ λ‚΄μš©", lines=10)
54
 
 
44
  "변화에 λŒ€ν•΄ μ–΄λ–»κ²Œ λ°˜μ‘ν•˜λ‚˜μš”?"
45
  ]
46
 
47
+ # μ˜΅μ…˜μ„ MBTI μ„±ν–₯에 맞게 μˆ˜μ •
48
+ options = {
49
+ "E/I": ["μ™Έν–₯적(E)", "λ‚΄ν–₯적(I)"],
50
+ "S/N": ["감각적(S)", "직관적(N)"],
51
+ "T/F": ["사고적(T)", "감정적(F)"],
52
+ "J/P": ["νŒλ‹¨μ (J)", "인식적(P)"]
53
+ }
54
+
55
  # Gradio μ•± μ •μ˜
56
  with gr.Blocks() as app:
57
  gr.Markdown("# MBTI 진단 ν…ŒμŠ€νŠΈ")
58
  with gr.Row():
59
+ # 각 μ§ˆλ¬Έμ— λŒ€ν•΄ MBTI μ„±ν–₯에 λ§žλŠ” μ˜΅μ…˜μ„ 제곡
60
+ answers = [gr.Radio(options[key], label=question) for key, question in zip(options.keys(), questions)]
61
  submit_button = gr.Button("κ²°κ³Ό 보기")
62
  output_mbti, output_interpretation = gr.Textbox(label="λ‹Ήμ‹ μ˜ MBTI μœ ν˜•"), gr.Textbox(label="μœ ν˜• 해석 및 진단 ν…ŒμŠ€νŠΈ λ‚΄μš©", lines=10)
63