Spaces:
Sleeping
Sleeping
bertugmirasyedi
commited on
Commit
·
4021af8
1
Parent(s):
1b4a9c9
Fixed NoneType error in the case of no data returned from the API
Browse files
app.py
CHANGED
@@ -451,7 +451,7 @@ async def summarize(descriptions: list, runtime="normal"):
|
|
451 |
# Summarize the descriptions
|
452 |
summaries = [
|
453 |
summarizer_pipe(description)
|
454 |
-
if (
|
455 |
else [{"summary_text": "No summary text is available."}]
|
456 |
for description in descriptions
|
457 |
]
|
|
|
451 |
# Summarize the descriptions
|
452 |
summaries = [
|
453 |
summarizer_pipe(description)
|
454 |
+
if (description != "Null" and description != None)
|
455 |
else [{"summary_text": "No summary text is available."}]
|
456 |
for description in descriptions
|
457 |
]
|