ldhldh commited on
Commit
b796a28
Β·
1 Parent(s): 0de7e55

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -50,11 +50,11 @@ def chat(x):
50
  50, # int, representing input in 'Top-k (nucleus sampling)' Slider component
51
  0.7, # float, representing input in 'Temperature' Slider component
52
  22, # int, representing input in 'Max New Tokens' Slider component
53
- 1.2, # float, representing input in 'repetition_penalty' Slider component
54
  fn_index=0
55
  )
56
  output = result[len(x)-2:]
57
- outout = re.sub("ν•˜ν•˜", "γ…Žγ…Ž", output)
58
  output = output.split('<|endoftext|>')[0]
59
  output = output.split('\n')[0]
60
  output = re.sub('[=+#/\:@*\"β€»γ†γ€β€˜|\\\<\>\(\)\[\]`\'…》\”\β€œ\’·]', ' ', output)
@@ -73,7 +73,7 @@ with gr.Blocks() as demo:
73
  inputs="text",
74
  outputs="text",
75
  description="chat",
76
- examples= [["\nfriend: λ„ˆλŠ” 꿈이 뭐야? \n\n### \nyou: "],["\nyou: λ„ˆλŠ” 무슨 색을 κ°€μž₯ μ’‹μ•„ν•΄? \nfriend: κΈ€μŽ„ λ„ˆλŠ”? \n\n### \nyou: "]]
77
  )
78
 
79
  bb = gr.Interface(
 
50
  50, # int, representing input in 'Top-k (nucleus sampling)' Slider component
51
  0.7, # float, representing input in 'Temperature' Slider component
52
  22, # int, representing input in 'Max New Tokens' Slider component
53
+ 1.1, # float, representing input in 'repetition_penalty' Slider component
54
  fn_index=0
55
  )
56
  output = result[len(x)-2:]
57
+ outout = re.sub("[ν•˜ν•˜]", "γ…Žγ…Ž", output)
58
  output = output.split('<|endoftext|>')[0]
59
  output = output.split('\n')[0]
60
  output = re.sub('[=+#/\:@*\"β€»γ†γ€β€˜|\\\<\>\(\)\[\]`\'…》\”\β€œ\’·]', ' ', output)
 
73
  inputs="text",
74
  outputs="text",
75
  description="chat",
76
+ examples= [[f"\nfriend: λ„ˆλŠ” 꿈이 뭐야? \n\n### \nyou: "],[f"\nyou: λ„ˆλŠ” 무슨 색을 κ°€μž₯ μ’‹μ•„ν•΄? \nfriend: κΈ€μŽ„ λ„ˆλŠ”? \n\n### \nyou: "]]
77
  )
78
 
79
  bb = gr.Interface(