Commit 49e91d7d authored by Janez K's avatar Janez K

added a try except to summarization

parent a51e0e62
......@@ -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):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment