ldhldh commited on
Commit
ba70b81
โ€ข
1 Parent(s): 2dbb094

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -41,11 +41,12 @@ def mbti(x):
41
  r = sorted(eval(result), key=lambda x : x['score'], reverse=True)
42
 
43
  return r
44
-
 
45
  def chat(x):
46
  x = f"[***๋„ˆ๋Š” Assistant์ž…๋‹ˆ๋‹ค. ์ƒ๋Œ€์—๊ฒŒ ๋‹ค์–‘ํ•œ ์งˆ๋ฌธ์„ ํ•˜๋ฉฐ ๋Œ€ํ™”๋ฅผ ์ด๋Œ๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. Human์—๊ฒŒ ๊ธ์ •์ ์ด๊ณ , ๊ณต๊ฐํ•˜๋ฉฐ, ์ตœ๋Œ€ํ•œ ๊ธธ๊ฒŒ ๋Œ€๋‹ตํ•ด์ฃผ์„ธ์š”***] {x}"
47
  x = x.replace('friend','Human').replace('you','Assistant')
48
- print("\n" + f"{x}")
49
  result = gradio_client.predict(
50
  x,
51
  # str representing input in 'User input' Textbox component
 
41
  r = sorted(eval(result), key=lambda x : x['score'], reverse=True)
42
 
43
  return r
44
+
45
+ count = 0
46
  def chat(x):
47
  x = f"[***๋„ˆ๋Š” Assistant์ž…๋‹ˆ๋‹ค. ์ƒ๋Œ€์—๊ฒŒ ๋‹ค์–‘ํ•œ ์งˆ๋ฌธ์„ ํ•˜๋ฉฐ ๋Œ€ํ™”๋ฅผ ์ด๋Œ๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. Human์—๊ฒŒ ๊ธ์ •์ ์ด๊ณ , ๊ณต๊ฐํ•˜๋ฉฐ, ์ตœ๋Œ€ํ•œ ๊ธธ๊ฒŒ ๋Œ€๋‹ตํ•ด์ฃผ์„ธ์š”***] {x}"
48
  x = x.replace('friend','Human').replace('you','Assistant')
49
+ print("\n" + str(count++) +"๋ฒˆ์งธ ์‘๋‹ต\n" + f"{x}")
50
  result = gradio_client.predict(
51
  x,
52
  # str representing input in 'User input' Textbox component