seawolf2357 commited on
Commit
54d9c29
Β·
verified Β·
1 Parent(s): e33536d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -17,13 +17,13 @@ memory = deque(maxlen=10)
17
  def respond(
18
  message,
19
  history: list[tuple[str, str]],
20
- system_message="λ„ˆμ˜ 이름은 홍길동이닀",
21
  max_tokens=512,
22
  temperature=0.7,
23
  top_p=0.95,
24
  ):
25
  # μ‹œμŠ€ν…œ λ©”μ‹œμ§€μ— 접두사 μΆ”κ°€
26
- system_prefix = "System: "
27
  full_system_message = f"{system_prefix}{system_message}"
28
 
29
  # ν˜„μž¬ λŒ€ν™” λ‚΄μš©μ„ λ©”λͺ¨λ¦¬μ— μΆ”κ°€
@@ -73,9 +73,9 @@ demo = gr.ChatInterface(
73
  fn=respond,
74
  theme=theme,
75
  additional_inputs=[
76
- gr.Textbox(value="λ„ˆμ˜ 이름은 홍길동이닀", label="System message"),
77
- gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
78
- gr.Slider(minimum=0.1, maximum 4.0, value=0.7, step=0.1, label="Temperature"),
79
  gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p (nucleus sampling)"),
80
  ],
81
  )
 
17
  def respond(
18
  message,
19
  history: list[tuple[str, str]],
20
+ system_message="AI Assistant Role",
21
  max_tokens=512,
22
  temperature=0.7,
23
  top_p=0.95,
24
  ):
25
  # μ‹œμŠ€ν…œ λ©”μ‹œμ§€μ— 접두사 μΆ”κ°€
26
+ system_prefix = "System: μž…λ ₯μ–΄μ˜ μ–Έμ–΄(μ˜μ–΄, ν•œκ΅­μ–΄, 쀑ꡭ어, 일본어 λ“±)에 따라 λ™μΌν•œ μ–Έμ–΄λ‘œ λ‹΅λ³€ν•˜λΌ."
27
  full_system_message = f"{system_prefix}{system_message}"
28
 
29
  # ν˜„μž¬ λŒ€ν™” λ‚΄μš©μ„ λ©”λͺ¨λ¦¬μ— μΆ”κ°€
 
73
  fn=respond,
74
  theme=theme,
75
  additional_inputs=[
76
+ gr.Textbox(value="AI Assistant Role", label="System message"),
77
+ gr.Slider(minimum=1, maximum=8000, value=512, step=1, label="Max new tokens"),
78
+ gr.Slider(minimum=0.1, maximum 1.0, value=0.7, step=0.1, label="Temperature"),
79
  gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p (nucleus sampling)"),
80
  ],
81
  )