Unggi commited on
Commit
829f512
1 Parent(s): 6d38642

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -2,6 +2,8 @@ import pip
2
  pip.main(['install', 'torch'])
3
  pip.main(['install', 'transformers'])
4
 
 
 
5
  import torch
6
  import gradio as gr
7
  import transformers
@@ -28,7 +30,7 @@ def inference(prompt_inputs):
28
  prompt_inputs = prompt_inputs.replace('\n', ' ')
29
 
30
  # prompt 구두점 단위로 분리하기
31
- prompt_list = prompt_inputs.split('.|!|?')
32
 
33
  class_id_list = []
34
 
 
2
  pip.main(['install', 'torch'])
3
  pip.main(['install', 'transformers'])
4
 
5
+ import re
6
+
7
  import torch
8
  import gradio as gr
9
  import transformers
 
30
  prompt_inputs = prompt_inputs.replace('\n', ' ')
31
 
32
  # prompt 구두점 단위로 분리하기
33
+ prompt_list = re.split('[.?!]+', prompt_inputs)
34
 
35
  class_id_list = []
36