Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -446,7 +446,7 @@ def create_index():
|
|
| 446 |
print(f'status code main:: {r.status_code}')
|
| 447 |
if r.status_code==200:
|
| 448 |
ind = json.loads(r.text)
|
| 449 |
-
print (f'ind
|
| 450 |
if not r.status_code==200:
|
| 451 |
print("Create new IND")
|
| 452 |
ind = []
|
|
@@ -457,12 +457,12 @@ def create_index():
|
|
| 457 |
|
| 458 |
if m.status_code==200:
|
| 459 |
main = json.loads(m.text)
|
| 460 |
-
print (f'main
|
| 461 |
if not r.status_code==200:
|
| 462 |
main = []
|
| 463 |
try:
|
| 464 |
for ea in main:
|
| 465 |
-
print(f'###### EACH::: {ea}')
|
| 466 |
print(f"KEYWORDS:: {ea['keywords']}")
|
| 467 |
except Exception as e:
|
| 468 |
print(f"ERROR:: {e}")
|
|
@@ -471,7 +471,7 @@ def create_index():
|
|
| 471 |
for k in ea['keywords']:
|
| 472 |
print(k)
|
| 473 |
print(ea['file_name'])
|
| 474 |
-
if k in ind
|
| 475 |
print("Adding to list")
|
| 476 |
ind[k].append(ea['file_name'])
|
| 477 |
else:
|
|
|
|
| 446 |
print(f'status code main:: {r.status_code}')
|
| 447 |
if r.status_code==200:
|
| 448 |
ind = json.loads(r.text)
|
| 449 |
+
print (f'ind::\n{ind}')
|
| 450 |
if not r.status_code==200:
|
| 451 |
print("Create new IND")
|
| 452 |
ind = []
|
|
|
|
| 457 |
|
| 458 |
if m.status_code==200:
|
| 459 |
main = json.loads(m.text)
|
| 460 |
+
print (f'main::\n{main}')
|
| 461 |
if not r.status_code==200:
|
| 462 |
main = []
|
| 463 |
try:
|
| 464 |
for ea in main:
|
| 465 |
+
#print(f'###### EACH::: {ea}')
|
| 466 |
print(f"KEYWORDS:: {ea['keywords']}")
|
| 467 |
except Exception as e:
|
| 468 |
print(f"ERROR:: {e}")
|
|
|
|
| 471 |
for k in ea['keywords']:
|
| 472 |
print(k)
|
| 473 |
print(ea['file_name'])
|
| 474 |
+
if k in ind:
|
| 475 |
print("Adding to list")
|
| 476 |
ind[k].append(ea['file_name'])
|
| 477 |
else:
|