ldhldh commited on
Commit
c374d69
β€’
1 Parent(s): 6af0e73

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -10
app.py CHANGED
@@ -29,13 +29,7 @@ def get_types(cls_set: List[Type], component: str):
29
  return docset, types
30
  routes.get_types = get_types
31
 
32
- def cut(prom, out):
33
- output = out[len(prom)-2:]
34
- outout = re.sub("ν•˜ν•˜", "γ…Žγ…Ž", output)
35
- output = output.split('<|endoftext|>')[0]
36
- output = output.split('\n')[0]
37
- output = re.sub('[=+#/\:@*\"β€»γ†γ€β€˜|\\\<\>\(\)\[\]`\'…》\”\β€œ\’·]', ' ', output)
38
- return output
39
  # App code
40
  def mbti(x):
41
  t = loop.run_until_complete(translator.translate(x, src='ko', dest='en'))
@@ -59,9 +53,12 @@ def chat(x):
59
  1.2, # float, representing input in 'repetition_penalty' Slider component
60
  fn_index=0
61
  )
62
- result = cut(x, result)
63
-
64
- return result
 
 
 
65
 
66
  def yn(x):
67
  result = gradio_client.predict(
 
29
  return docset, types
30
  routes.get_types = get_types
31
 
32
+
 
 
 
 
 
 
33
  # App code
34
  def mbti(x):
35
  t = loop.run_until_complete(translator.translate(x, src='ko', dest='en'))
 
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)
61
+ return output
62
 
63
  def yn(x):
64
  result = gradio_client.predict(