Spaces:
Sleeping
Sleeping
Update app_pyvis_new.py
Browse files- app_pyvis_new.py +10 -11
app_pyvis_new.py
CHANGED
|
@@ -64,17 +64,16 @@ def display_info(selected_row_str):
|
|
| 64 |
if not row_data.empty:
|
| 65 |
row_data = row_data.squeeze()
|
| 66 |
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
storyline = "\n\n".join(part for part in storyline_parts if len(str(part).split(': ')[1].strip()) > 0)
|
| 78 |
|
| 79 |
causal_graph_caption = row_data.get('llama graph', '')
|
| 80 |
try:
|
|
|
|
| 64 |
if not row_data.empty:
|
| 65 |
row_data = row_data.squeeze()
|
| 66 |
|
| 67 |
+
data_map = {
|
| 68 |
+
"Key Information": row_data.get('key information', ''),
|
| 69 |
+
"Severity": row_data.get('severity', ''),
|
| 70 |
+
"Key Drivers": row_data.get('key drivers', ''),
|
| 71 |
+
"Main Impacts, Exposure, and Vulnerability": row_data.get('main impacts, exposure, and vulnerability', ''),
|
| 72 |
+
"Likelihood of Multi-Hazard Risks": row_data.get('likelihood of multi-hazard risks', ''),
|
| 73 |
+
"Best Practices for Managing This Risk": row_data.get('best practices for managing this risk', ''),
|
| 74 |
+
"Recommendations and Supportive Measures for Recovery": row_data.get('recommendations and supportive measures for recovery', '')
|
| 75 |
+
}
|
| 76 |
+
storyline = "\n\n".join(f"**{label}:** {value}" for label, value in data_map.items() if value and str(value).strip())
|
|
|
|
| 77 |
|
| 78 |
causal_graph_caption = row_data.get('llama graph', '')
|
| 79 |
try:
|