Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -234,7 +234,7 @@ with col_about:
|
|
234 |
"""
|
235 |
This app is a prototype for testing purposes using publicly available project data from the German International Cooperation Society (GIZ) as of 23rd February 2025.
|
236 |
**Please do NOT enter sensitive or personal information.**
|
237 |
-
**Note**: The
|
238 |
""", unsafe_allow_html=True)
|
239 |
|
240 |
|
@@ -416,9 +416,11 @@ else:
|
|
416 |
if resolved_name.upper() != code.upper():
|
417 |
matched_countries.append(resolved_name)
|
418 |
crs_key = metadata.get("crs_key", "").strip()
|
419 |
-
|
420 |
-
|
421 |
-
|
|
|
|
|
422 |
client_name = metadata.get('client', 'Unknown Client')
|
423 |
contact = metadata.get("contact", "").strip()
|
424 |
objective_highlighted = highlight_query(objective, var) if var.strip() else objective
|
@@ -486,9 +488,11 @@ else:
|
|
486 |
if resolved_name.upper() != code.upper():
|
487 |
matched_countries.append(resolved_name)
|
488 |
crs_key = metadata.get("crs_key", "").strip()
|
489 |
-
|
490 |
-
|
491 |
-
|
|
|
|
|
492 |
client_name = metadata.get('client', 'Unknown Client')
|
493 |
contact = metadata.get("contact", "").strip()
|
494 |
additional_text = (
|
|
|
234 |
"""
|
235 |
This app is a prototype for testing purposes using publicly available project data from the German International Cooperation Society (GIZ) as of 23rd February 2025.
|
236 |
**Please do NOT enter sensitive or personal information.**
|
237 |
+
**Note**: The answers are AI-generated and may be wrong or misleading.
|
238 |
""", unsafe_allow_html=True)
|
239 |
|
240 |
|
|
|
416 |
if resolved_name.upper() != code.upper():
|
417 |
matched_countries.append(resolved_name)
|
418 |
crs_key = metadata.get("crs_key", "").strip()
|
419 |
+
# Convert to string and remove trailing ".0"
|
420 |
+
crs_key_clean = re.sub(r'\.0$', '', str(crs_key))
|
421 |
+
new_crs_value = lookup_crs_value(crs_key_clean)
|
422 |
+
new_crs_value_clean = re.sub(r'\.0$', '', str(new_crs_value))
|
423 |
+
crs_combined = f"{crs_key_clean}: {new_crs_value_clean}" if crs_key_clean else "Unknown"
|
424 |
client_name = metadata.get('client', 'Unknown Client')
|
425 |
contact = metadata.get("contact", "").strip()
|
426 |
objective_highlighted = highlight_query(objective, var) if var.strip() else objective
|
|
|
488 |
if resolved_name.upper() != code.upper():
|
489 |
matched_countries.append(resolved_name)
|
490 |
crs_key = metadata.get("crs_key", "").strip()
|
491 |
+
# Convert to string and remove trailing ".0"
|
492 |
+
crs_key_clean = re.sub(r'\.0$', '', str(crs_key))
|
493 |
+
new_crs_value = lookup_crs_value(crs_key_clean)
|
494 |
+
new_crs_value_clean = re.sub(r'\.0$', '', str(new_crs_value))
|
495 |
+
crs_combined = f"{crs_key_clean}: {new_crs_value_clean}" if crs_key_clean else "Unknown"
|
496 |
client_name = metadata.get('client', 'Unknown Client')
|
497 |
contact = metadata.get("contact", "").strip()
|
498 |
additional_text = (
|