Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -44,10 +44,10 @@ try:
|
|
44 |
with open("mbti.json", "r", encoding="utf-8") as f:
|
45 |
# Expecting a single MBTI key string, e.g., "entj"
|
46 |
mbti_key = json.load(f)
|
47 |
-
mbti_key = mbti_key.strip().lower() if isinstance(mbti_key, str) else "
|
48 |
except Exception as e:
|
49 |
logging.error(f"Error reading mbti.json: {e}")
|
50 |
-
mbti_key = "
|
51 |
|
52 |
mbti_mapping = {
|
53 |
"INTJ": "INTJ (The Architect) - Future-oriented with innovative strategies and thorough analysis. Example: [Dana Scully](https://en.wikipedia.org/wiki/Dana_Scully)",
|
@@ -69,7 +69,7 @@ mbti_mapping = {
|
|
69 |
}
|
70 |
|
71 |
# Use the mapped MBTI description, defaulting to intj if not found
|
72 |
-
fixed_mbti = mbti_mapping.get(mbti_key, mbti_mapping["
|
73 |
|
74 |
# =============================================================================
|
75 |
# Test API Connection function
|
@@ -766,7 +766,7 @@ css = """
|
|
766 |
}
|
767 |
"""
|
768 |
title_html = """
|
769 |
-
<h1 align="center" style="margin-bottom: 0.2em; font-size: 1.6em;"> π HeartSync MBTI-
|
770 |
<p align="center" style="font-size:1.1em; color:#555;">
|
771 |
A lightweight and powerful AI service offering ChatGPT-4o-level multimodal, web search, and image generation capabilities for local installation. <br>
|
772 |
β
FLUX Image Generation β
Inference β
Censorship Bypass β
Multimodal & VLM β
Real-time Web Search β
RAG <br>
|
|
|
44 |
with open("mbti.json", "r", encoding="utf-8") as f:
|
45 |
# Expecting a single MBTI key string, e.g., "entj"
|
46 |
mbti_key = json.load(f)
|
47 |
+
mbti_key = mbti_key.strip().lower() if isinstance(mbti_key, str) else "ESTP"
|
48 |
except Exception as e:
|
49 |
logging.error(f"Error reading mbti.json: {e}")
|
50 |
+
mbti_key = "ESTP" # default
|
51 |
|
52 |
mbti_mapping = {
|
53 |
"INTJ": "INTJ (The Architect) - Future-oriented with innovative strategies and thorough analysis. Example: [Dana Scully](https://en.wikipedia.org/wiki/Dana_Scully)",
|
|
|
69 |
}
|
70 |
|
71 |
# Use the mapped MBTI description, defaulting to intj if not found
|
72 |
+
fixed_mbti = mbti_mapping.get(mbti_key, mbti_mapping["ESTP"])
|
73 |
|
74 |
# =============================================================================
|
75 |
# Test API Connection function
|
|
|
766 |
}
|
767 |
"""
|
768 |
title_html = """
|
769 |
+
<h1 align="center" style="margin-bottom: 0.2em; font-size: 1.6em;"> π HeartSync MBTI-ESTP π </h1>
|
770 |
<p align="center" style="font-size:1.1em; color:#555;">
|
771 |
A lightweight and powerful AI service offering ChatGPT-4o-level multimodal, web search, and image generation capabilities for local installation. <br>
|
772 |
β
FLUX Image Generation β
Inference β
Censorship Bypass β
Multimodal & VLM β
Real-time Web Search β
RAG <br>
|