Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,6 @@ model = RobertaForSequenceClassification.from_pretrained("PirateXX/ChatGPT-Text-
|
|
13 |
model_name = "roberta-base"
|
14 |
tokenizer = RobertaTokenizer.from_pretrained(model_name, map_location=torch.device('cpu'))
|
15 |
|
16 |
-
# function to break text into an array of sentences
|
17 |
def text_to_sentences(text):
|
18 |
re.sub(r'(?<=[.!?])(?=[^\s])', r' ', text)
|
19 |
return re.split(r'[.!?]', text)
|
|
|
13 |
model_name = "roberta-base"
|
14 |
tokenizer = RobertaTokenizer.from_pretrained(model_name, map_location=torch.device('cpu'))
|
15 |
|
|
|
16 |
def text_to_sentences(text):
|
17 |
re.sub(r'(?<=[.!?])(?=[^\s])', r' ', text)
|
18 |
return re.split(r'[.!?]', text)
|