JaishnaCodz commited on
Commit
01e4eed
·
verified ·
1 Parent(s): 9994894

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -8,12 +8,13 @@ import re
8
 
9
  nltk.download("punkt")
10
 
11
- # Use local LanguageTool server (must be running on port 8081)
12
  grammar_tool = language_tool_python.LanguageToolPublicAPI(
13
  language='en-US',
14
- endpoint='http://localhost:8081/v2/'
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")