Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -8,12 +8,13 @@ import re
|
|
8 |
|
9 |
nltk.download("punkt")
|
10 |
|
11 |
-
#
|
12 |
grammar_tool = language_tool_python.LanguageToolPublicAPI(
|
13 |
language='en-US',
|
14 |
-
|
15 |
)
|
16 |
|
|
|
17 |
# Hugging Face pipelines
|
18 |
toxicity_classifier = pipeline("text-classification", model="unitary/toxic-bert")
|
19 |
summarizer = pipeline("summarization", model="sshleifer/distilbart-cnn-6-6")
|
|
|
8 |
|
9 |
nltk.download("punkt")
|
10 |
|
11 |
+
# Correct way to connect to the locally running LanguageTool server
|
12 |
grammar_tool = language_tool_python.LanguageToolPublicAPI(
|
13 |
language='en-US',
|
14 |
+
remote_server='http://localhost:8081/v2/'
|
15 |
)
|
16 |
|
17 |
+
|
18 |
# Hugging Face pipelines
|
19 |
toxicity_classifier = pipeline("text-classification", model="unitary/toxic-bert")
|
20 |
summarizer = pipeline("summarization", model="sshleifer/distilbart-cnn-6-6")
|