Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2022-196
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2022-196
2022-196
Commits
d7f8b96e
Commit
d7f8b96e
authored
Nov 14, 2022
by
Dilip Wijethunga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Scraping Score Update
parent
3dc873f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
api/web_scrapping.py
api/web_scrapping.py
+6
-3
No files found.
api/web_scrapping.py
View file @
d7f8b96e
...
...
@@ -70,16 +70,19 @@ def start_web_scrapping():
if
len
(
sentence
.
split
())
>=
6
:
pred
=
predict
(
sentence
)
m
[
pred
]
+=
1
score
=
m
[
1
]
/
(
m
[
1
]
+
m
[
0
])
*
100
if
m
[
1
]
>
m
[
0
]:
set_sentiment
(
'Positive'
)
set_sentiment_score
(
m
[
1
]
)
set_sentiment_score
(
round
(
score
,
2
)
)
else
:
set_sentiment
(
'Negative'
)
set_sentiment_score
(
m
[
1
]
)
set_sentiment_score
(
round
(
100
-
score
,
2
)
)
# only for testing
'''
if __name__ == "__main__":
if __name__ == "__main__":
start_web_scrapping()
'''
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment