Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -60,7 +60,11 @@ def parse_wbg_results(raw_output):
|
|
60 |
]
|
61 |
"""
|
62 |
print(">>> DEBUG: raw_output =", raw_output)
|
63 |
-
|
|
|
|
|
|
|
|
|
64 |
# If raw_output is a dict (instead of a list), convert it to the expected list format.
|
65 |
if isinstance(raw_output, dict):
|
66 |
parsed_list = []
|
@@ -369,7 +373,7 @@ def process_all_analysis(text):
|
|
369 |
heatmap, # Plot 3: Correlation Heatmap.
|
370 |
evolution_chart, # Plot 4: Section Topic Evolution.
|
371 |
gauge_chart, # Plot 5: Confidence Gauge.
|
372 |
-
go.Figure() # Plot 6: (Placeholder for
|
373 |
)
|
374 |
|
375 |
except Exception as e:
|
@@ -433,6 +437,6 @@ if __name__ == "__main__":
|
|
433 |
demo.launch(
|
434 |
server_name="0.0.0.0",
|
435 |
server_port=7860,
|
436 |
-
share=False, #
|
437 |
debug=True
|
438 |
)
|
|
|
60 |
]
|
61 |
"""
|
62 |
print(">>> DEBUG: raw_output =", raw_output)
|
63 |
+
|
64 |
+
# If raw_output is a list of lists, flatten it.
|
65 |
+
if isinstance(raw_output, list) and len(raw_output) > 0 and isinstance(raw_output[0], list):
|
66 |
+
raw_output = raw_output[0]
|
67 |
+
|
68 |
# If raw_output is a dict (instead of a list), convert it to the expected list format.
|
69 |
if isinstance(raw_output, dict):
|
70 |
parsed_list = []
|
|
|
373 |
heatmap, # Plot 3: Correlation Heatmap.
|
374 |
evolution_chart, # Plot 4: Section Topic Evolution.
|
375 |
gauge_chart, # Plot 5: Confidence Gauge.
|
376 |
+
go.Figure() # Plot 6: (Placeholder for additional sentiment analysis chart).
|
377 |
)
|
378 |
|
379 |
except Exception as e:
|
|
|
437 |
demo.launch(
|
438 |
server_name="0.0.0.0",
|
439 |
server_port=7860,
|
440 |
+
share=False, # To create a public link, set share=True.
|
441 |
debug=True
|
442 |
)
|