Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -448,34 +448,7 @@ def format_json(inp):
|
|
| 448 |
if "}" in line:
|
| 449 |
new_json.append(start_json)
|
| 450 |
print (new_json)
|
| 451 |
-
|
| 452 |
-
|
| 453 |
-
|
| 454 |
-
#if line.startswith(("keywords","title","description","content","url","{","}")):
|
| 455 |
-
# print (line)
|
| 456 |
-
|
| 457 |
-
'''
|
| 458 |
-
print (f'NEW LINE:: {line}')
|
| 459 |
-
if line.startswith("keywords"):
|
| 460 |
-
keywords_val = line.split(":")[1]
|
| 461 |
-
if line.startswith("title"):
|
| 462 |
-
title_val = line.split(":")[1]
|
| 463 |
-
if line.startswith("description"):
|
| 464 |
-
description_val = line.split(":")[1]
|
| 465 |
-
if line.startswith("content"):
|
| 466 |
-
content_val = line.split(":")[1]
|
| 467 |
-
if line.startswith("url"):
|
| 468 |
-
url_val = line.split(":")[1]
|
| 469 |
-
|
| 470 |
-
"keywords": ["texas", "news", "breaking", "houston", "dallas", "shooting"],
|
| 471 |
-
"title": "Breaking News from CBS11 - CBS Texas",
|
| 472 |
-
"description": "The latest news and headlines from CBS Texas.",
|
| 473 |
-
"content": "CBS Texas provides the latest news and headlines. The source url is https://www.cbsnews.com/texas/local-news/",
|
| 474 |
-
"url": "http
|
| 475 |
-
'''
|
| 476 |
-
|
| 477 |
-
|
| 478 |
-
#if line.startswith()
|
| 479 |
|
| 480 |
def create_index():
|
| 481 |
uid=uuid.uuid4()
|
|
|
|
| 448 |
if "}" in line:
|
| 449 |
new_json.append(start_json)
|
| 450 |
print (new_json)
|
| 451 |
+
return new_json
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 452 |
|
| 453 |
def create_index():
|
| 454 |
uid=uuid.uuid4()
|