Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Imène Lajili
clowdflows
Commits
49e91d7d
Commit
49e91d7d
authored
Dec 24, 2015
by
Janez K
Browse files
added a try except to summarization
parent
a51e0e62
Changes
1
Hide whitespace changes
Inline
Side-by-side
workflows/streaming/library.py
View file @
49e91d7d
...
...
@@ -330,9 +330,12 @@ def streaming_triplet_extraction(input_dict,widget,stream=None):
def
streaming_summarize_url
(
input_dict
,
widget
,
stream
=
None
):
import
pyteaser
summaries
=
pyteaser
.
SummarizeUrl
(
input_dict
[
'url'
])
output_dict
=
{}
output_dict
[
'summary'
]
=
" "
.
join
(
summaries
)
try
:
summaries
=
pyteaser
.
SummarizeUrl
(
input_dict
[
'url'
])
output_dict
=
{}
output_dict
[
'summary'
]
=
" "
.
join
(
summaries
)
except
:
output_dict
[
'summary'
]
=
''
return
output_dict
def
streaming_get_article_text
(
input_dict
,
widget
,
stream
=
None
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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