Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -483,6 +483,7 @@ def summarize(inp,history,report_check,chart_check,data=None,files=None,director
|
|
| 483 |
def search_fn(inp,history,report_check,chart_check,data):
|
| 484 |
#data=find_fn(inp,)
|
| 485 |
error_box=""
|
|
|
|
| 486 |
if inp == "":
|
| 487 |
inp = "Process this data"
|
| 488 |
history.clear()
|
|
@@ -502,9 +503,9 @@ def search_fn(inp,history,report_check,chart_check,data):
|
|
| 502 |
print (f'c:: {c}')
|
| 503 |
|
| 504 |
#json_start = sort_fn(out)
|
| 505 |
-
json_out = find_keyword_fn(c,inp,data)
|
| 506 |
-
print(f'JSON_BOX:: {json_out}')
|
| 507 |
-
out = str(json_out)
|
| 508 |
if report_check:
|
| 509 |
rl = len(out)
|
| 510 |
print(f'rl:: {rl}')
|
|
@@ -516,11 +517,11 @@ def search_fn(inp,history,report_check,chart_check,data):
|
|
| 516 |
rawp = compress_data_og(c,inp,out)
|
| 517 |
else:
|
| 518 |
rawp = out
|
| 519 |
-
try:
|
| 520 |
-
|
| 521 |
-
|
| 522 |
-
except Exception as e:
|
| 523 |
-
|
| 524 |
if chart_check:
|
| 525 |
print (f"making chart from ::: {rawp}")
|
| 526 |
error_box = get_chart(str(json_out))
|
|
|
|
| 483 |
def search_fn(inp,history,report_check,chart_check,data):
|
| 484 |
#data=find_fn(inp,)
|
| 485 |
error_box=""
|
| 486 |
+
json_out={}
|
| 487 |
if inp == "":
|
| 488 |
inp = "Process this data"
|
| 489 |
history.clear()
|
|
|
|
| 503 |
print (f'c:: {c}')
|
| 504 |
|
| 505 |
#json_start = sort_fn(out)
|
| 506 |
+
#json_out = find_keyword_fn(c,inp,data)
|
| 507 |
+
#print(f'JSON_BOX:: {json_out}')
|
| 508 |
+
#out = str(json_out)
|
| 509 |
if report_check:
|
| 510 |
rl = len(out)
|
| 511 |
print(f'rl:: {rl}')
|
|
|
|
| 517 |
rawp = compress_data_og(c,inp,out)
|
| 518 |
else:
|
| 519 |
rawp = out
|
| 520 |
+
#try:
|
| 521 |
+
# json_out=format_json(json_out)
|
| 522 |
+
# print("JSON FORMATTED")
|
| 523 |
+
#except Exception as e:
|
| 524 |
+
# print (e)
|
| 525 |
if chart_check:
|
| 526 |
print (f"making chart from ::: {rawp}")
|
| 527 |
error_box = get_chart(str(json_out))
|