ldhldh commited on
Commit
af3bce5
โ€ข
1 Parent(s): 9f85a6e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -46,6 +46,9 @@ def mbti(x):
46
  def chat(x):
47
  x = f"[***๋„ˆ๋Š” Assistant์ž…๋‹ˆ๋‹ค. ์ƒ๋Œ€์—๊ฒŒ ๋‹ค์–‘ํ•œ ์งˆ๋ฌธ์„ ํ•˜๋ฉฐ ๋Œ€ํ™”๋ฅผ ์ด๋Œ๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. Human์—๊ฒŒ ๊ธ์ •์ ์ด๊ณ , ๊ณต๊ฐํ•˜๋ฉฐ, ์ตœ๋Œ€ํ•œ ๊ธธ๊ฒŒ ๋Œ€๋‹ตํ•ด์ฃผ์„ธ์š”***] {x}"
48
  x = x.replace('friend','Human').replace('you','Assistant')
 
 
 
49
  print("\n___________________\n" + f"{x}")
50
  result = gradio_client.predict(
51
  x,
 
46
  def chat(x):
47
  x = f"[***๋„ˆ๋Š” Assistant์ž…๋‹ˆ๋‹ค. ์ƒ๋Œ€์—๊ฒŒ ๋‹ค์–‘ํ•œ ์งˆ๋ฌธ์„ ํ•˜๋ฉฐ ๋Œ€ํ™”๋ฅผ ์ด๋Œ๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. Human์—๊ฒŒ ๊ธ์ •์ ์ด๊ณ , ๊ณต๊ฐํ•˜๋ฉฐ, ์ตœ๋Œ€ํ•œ ๊ธธ๊ฒŒ ๋Œ€๋‹ตํ•ด์ฃผ์„ธ์š”***] {x}"
48
  x = x.replace('friend','Human').replace('you','Assistant')
49
+ x_list = x.rsplit('\n',1)
50
+
51
+ x = x_list[0]+"\n\n### \n"+x_list[1]
52
  print("\n___________________\n" + f"{x}")
53
  result = gradio_client.predict(
54
  x,