ElPlaguister commited on
Commit
c8a4b93
โ€ข
1 Parent(s): bbc20a6

Feat Special Token can be Replaced

Browse files
Files changed (3) hide show
  1. README.txt +1 -1
  2. app.py +1 -1
  3. model.py +2 -0
README.txt CHANGED
@@ -1,4 +1,4 @@
1
- # KOMUCHAT : Korean community-style relationship counseling chabot
2
  KOMUChat: ์˜จ๋ผ์ธ ์ปค๋ฎค๋‹ˆํ‹ฐ ์Šคํƒ€์ผ์˜ ์—ฐ์• ์ƒ๋‹ด์ฑ—๋ด‡
3
  ### ๊ฐœ์š”
4
  ์‚ฌ๋žŒ๋“ค์˜ ์‹ค์ œ ๋Œ€ํ™”๋ฅผ ๋ฐ˜์˜ํ•˜๊ธฐ ์œ„ํ•ด ํ•œ๊ตญ ์ปค๋ฎค๋‹ˆํ‹ฐ ์—ํŽจ์ฝ”๋ฆฌ์•„ + ์ธ์Šคํ‹ฐ์ฆˆ์—์„œ ์ˆ˜์ง‘ํ•œ ์•ฝ 3๋งŒ๊ฑด์˜ ์งˆ๋ฌธ-๋‹ต๋ณ€ ๋Œ€ํ™” ๋ฐ์ดํ„ฐ์…‹์œผ๋กœ ํ•™์Šต์‹œํ‚จ ์ฑ—๋ด‡<br>
 
1
+ # KOMUCHAT : Korean community-style relationship counseling chatbot
2
  KOMUChat: ์˜จ๋ผ์ธ ์ปค๋ฎค๋‹ˆํ‹ฐ ์Šคํƒ€์ผ์˜ ์—ฐ์• ์ƒ๋‹ด์ฑ—๋ด‡
3
  ### ๊ฐœ์š”
4
  ์‚ฌ๋žŒ๋“ค์˜ ์‹ค์ œ ๋Œ€ํ™”๋ฅผ ๋ฐ˜์˜ํ•˜๊ธฐ ์œ„ํ•ด ํ•œ๊ตญ ์ปค๋ฎค๋‹ˆํ‹ฐ ์—ํŽจ์ฝ”๋ฆฌ์•„ + ์ธ์Šคํ‹ฐ์ฆˆ์—์„œ ์ˆ˜์ง‘ํ•œ ์•ฝ 3๋งŒ๊ฑด์˜ ์งˆ๋ฌธ-๋‹ต๋ณ€ ๋Œ€ํ™” ๋ฐ์ดํ„ฐ์…‹์œผ๋กœ ํ•™์Šต์‹œํ‚จ ์ฑ—๋ด‡<br>
app.py CHANGED
@@ -58,7 +58,7 @@ if __name__=='__main__':
58
  MODELS[1].placeholder = '์—ฐ์•  ๊ด€๋ จ ์งˆ๋ฌธ์„ ์ž…๋ ฅํ•˜์„ธ์š”. (KoAlpaca๋Š” ์ถ”๋ก  ์‹œ 1๋ถ„ ์ด์ƒ ์†Œ์š”๋ฉ๋‹ˆ๋‹ค!)'
59
 
60
  with gr.Blocks(theme=prepare_theme()) as demo:
61
- gr.HTML("<h1>KOMUChat : Korean community-style relationship counseling chabot</h1>")
62
  with gr.Tab("์†Œ๊ฐœ"):
63
  gr.Markdown(readme)
64
  for i in range(len(MODELS)):
 
58
  MODELS[1].placeholder = '์—ฐ์•  ๊ด€๋ จ ์งˆ๋ฌธ์„ ์ž…๋ ฅํ•˜์„ธ์š”. (KoAlpaca๋Š” ์ถ”๋ก  ์‹œ 1๋ถ„ ์ด์ƒ ์†Œ์š”๋ฉ๋‹ˆ๋‹ค!)'
59
 
60
  with gr.Blocks(theme=prepare_theme()) as demo:
61
+ gr.HTML("<h1>KOMUChat : Korean community-style relationship counseling chatbot</h1>")
62
  with gr.Tab("์†Œ๊ฐœ"):
63
  gr.Markdown(readme)
64
  for i in range(len(MODELS)):
model.py CHANGED
@@ -16,5 +16,7 @@ class Model:
16
 
17
  def chat(self, message, chat_history):
18
  response = self.generate(message)
 
 
19
  chat_history.append((message, response))
20
  return "", gr.Chatbot(chat_history, label=self.name, bubble_full_width=False)
 
16
 
17
  def chat(self, message, chat_history):
18
  response = self.generate(message)
19
+ response = response.replace('#ํ™”์ž#', '๋„ˆ')
20
+ response = response.replace('#์ฒญ์ž#', '๋„ˆ')
21
  chat_history.append((message, response))
22
  return "", gr.Chatbot(chat_history, label=self.name, bubble_full_width=False)