ldhldh commited on
Commit
2a18f96
β€’
1 Parent(s): 152d44c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -44,8 +44,9 @@ def mbti(x):
44
 
45
  def chat(x):
46
  x = f"{x}"
 
47
  result = gradio_client.predict(
48
- x.replace('friend','Human').replace('you','Assistant'),
49
  # str representing input in 'User input' Textbox component
50
  0.92, # float, representing input in 'Top-p (nucleus sampling)' Slider component
51
  40, # int, representing input in 'Top-k (nucleus sampling)' Slider component
@@ -59,7 +60,6 @@ def chat(x):
59
  output = re.sub('ν•˜ν•˜','γ…Žγ…Ž', output)
60
  output = output.split('띓')[0]
61
  output = output.split('<|endoftext|>')[0]
62
- output = output.split('\n')[0]
63
  output = re.sub('[=+#/\:@*\"β€»γ†γ€β€˜|\\\<\>\(\)\[\]`\'…》\”\β€œ\’·]', ' ', output)
64
  output = re.sub('[a-zA-Z]',' ',output)
65
 
 
44
 
45
  def chat(x):
46
  x = f"{x}"
47
+ x = x.replace('friend','Human').replace('you','Assistant')
48
  result = gradio_client.predict(
49
+ x,
50
  # str representing input in 'User input' Textbox component
51
  0.92, # float, representing input in 'Top-p (nucleus sampling)' Slider component
52
  40, # int, representing input in 'Top-k (nucleus sampling)' Slider component
 
60
  output = re.sub('ν•˜ν•˜','γ…Žγ…Ž', output)
61
  output = output.split('띓')[0]
62
  output = output.split('<|endoftext|>')[0]
 
63
  output = re.sub('[=+#/\:@*\"β€»γ†γ€β€˜|\\\<\>\(\)\[\]`\'…》\”\β€œ\’·]', ' ', output)
64
  output = re.sub('[a-zA-Z]',' ',output)
65