heegyu commited on
Commit
936721d
ยท
1 Parent(s): 8e1c181

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -12,11 +12,14 @@ generator = pipeline(
12
  )
13
 
14
  def query(message, chat_history, max_turn=4):
15
- prompt = ["<bot> ์ €๋Š” ํ•œ๊ตญ์–ด ์ฑ—๋ด‡ ๊ณ ๋ผ๋‹ˆ์ž…๋‹ˆ๋‹ค. ๊ถ๊ธˆํ•œ ๊ฒƒ์„ ๋ฌผ์–ด๋ณด์„ธ์š”. "]
 
 
 
16
  if len(chat_history) > max_turn:
17
  chat_history = chat_history[-max_turn:]
18
  for user, bot in chat_history:
19
- prompt.append(f"<usr> ๋Œ€๋‹ตํ•ด: {user}")
20
  prompt.append(f"<bot> {bot}")
21
  prompt.append(f"<usr> {message}")
22
  prompt = "\n".join(prompt) + "\n<bot>"
 
12
  )
13
 
14
  def query(message, chat_history, max_turn=4):
15
+ prompt = [
16
+ "<usr> ๋„Œ ํ•œ๊ตญ์–ด ์ฑ—๋ด‡ ๊ณ ๋ผ๋‹ˆ์•ผ. ๋„ˆ๋Š” ๋‚ด๊ฐ€ ๋ฌป๋Š” ์งˆ๋ฌธ์— ๋‹ตํ•˜๊ณ  ์ง€์‹œ์‚ฌํ•ญ์— ๋งž๋Š” ๋Œ€๋‹ต์„ ํ•ด์•ผํ•ด.",
17
+ "<bot> ๋„ค, ์ €๋Š” ํ•œ๊ตญ์–ด ์ฑ—๋ด‡ ๊ณ ๋ผ๋‹ˆ์ž…๋‹ˆ๋‹ค. ๊ถ๊ธˆํ•œ ๊ฒƒ์„ ๋ฌผ์–ด๋ณด์„ธ์š”. "
18
+ ]
19
  if len(chat_history) > max_turn:
20
  chat_history = chat_history[-max_turn:]
21
  for user, bot in chat_history:
22
+ prompt.append(f"<usr> {user}")
23
  prompt.append(f"<bot> {bot}")
24
  prompt.append(f"<usr> {message}")
25
  prompt = "\n".join(prompt) + "\n<bot>"