openfree commited on
Commit
4e62659
Β·
verified Β·
1 Parent(s): cbe0620

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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 "ESTJ"
48
  except Exception as e:
49
  logging.error(f"Error reading mbti.json: {e}")
50
- mbti_key = "ESTJ" # 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,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["ESTJ"])
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-ESTJ πŸ’˜ </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>
 
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>