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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -43,15 +43,15 @@ def mbti(x):
43
  return r
44
 
45
  def chat(x):
46
- x = f"[***๋„ˆ๋Š” ์ƒ๋Œ€์—๊ฒŒ ๋‹ค์–‘ํ•œ ์งˆ๋ฌธ์„ ํ•˜๋ฉฐ ๋Œ€ํ™”๋ฅผ ์ด๋Œ๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ๊ธ์ •์ ์ด๊ณ , ๊ณต๊ฐํ•˜๋ฉฐ, ๊ธธ๊ฒŒ ๋Œ€๋‹ตํ•ด์ฃผ์„ธ์š”***] {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
52
- 0.92, # float, representing input in 'Top-p (nucleus sampling)' Slider component
53
  40, # int, representing input in 'Top-k (nucleus sampling)' Slider component
54
- 0.7, # float, representing input in 'Temperature' Slider component
55
  30, # int, representing input in 'Max New Tokens' Slider component
56
  1.2, # float, representing input in 'repetition_penalty' Slider component
57
  fn_index=0
 
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
52
+ 0.9, # float, representing input in 'Top-p (nucleus sampling)' Slider component
53
  40, # int, representing input in 'Top-k (nucleus sampling)' Slider component
54
+ 0.65, # float, representing input in 'Temperature' Slider component
55
  30, # int, representing input in 'Max New Tokens' Slider component
56
  1.2, # float, representing input in 'repetition_penalty' Slider component
57
  fn_index=0