CyberCoder225 commited on
Commit
76a5cb1
·
verified ·
1 Parent(s): 38f47d1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -10
app.py CHANGED
@@ -19,13 +19,13 @@ FILE_PRIME = "Llama-3.2-1B-Instruct-Q4_K_M.gguf"
19
  REPO_LOGIC = "Qwen/Qwen2.5-1.5B-Instruct-GGUF"
20
  FILE_LOGIC = "qwen2.5-1.5b-instruct-q4_k_m.gguf"
21
 
22
- # 4. Maira Chat (Danube 3 500M)
23
  REPO_CHAT = "h2oai/h2o-danube3-500m-chat-GGUF"
24
- FILE_CHAT = "h2o-danube3-500m-chat-v1-q4_k_m.gguf"
25
 
26
- # 5. Maira Art (StableLM 2 1.6B)
27
- REPO_ART = "stabilityai/stablelm-2-zephyr-1_6b-gguf"
28
- FILE_ART = "stablelm-2-zephyr-1_6b-Q4_K_M.gguf"
29
 
30
  # --- Initialize All Brains ---
31
  print("🌌 Initializing Neural Cores...")
@@ -34,14 +34,15 @@ maira_prime = MairaBrain(REPO_PRIME, FILE_PRIME)
34
  maira_logic = MairaBrain(REPO_LOGIC, FILE_LOGIC)
35
  maira_chat = MairaBrain(REPO_CHAT, FILE_CHAT)
36
  maira_art = MairaBrain(REPO_ART, FILE_ART)
37
- print("✅ All Cores Online.")
38
 
39
  @app.route('/', methods=['GET'])
40
  def home():
41
  return jsonify({
42
  "status": "online",
43
  "version": "6.0 (Quintessence)",
44
- "active_models": ["small", "medium", "qwen", "danube", "stable"]
 
45
  })
46
 
47
  @app.route('/chat', methods=['POST'])
@@ -62,16 +63,16 @@ def chat():
62
  elif model_type == "danube":
63
  answer = maira_chat.get_response(user_id, user_input)
64
  model_used = "maira-chat"
65
- elif model_type == "stable":
66
  answer = maira_art.get_response(user_id, user_input)
67
  model_used = "maira-art"
68
  else:
69
  answer = maira_lite.get_response(user_id, user_input)
70
  model_used = "maira-lite"
71
-
72
  return jsonify({
73
  "maira": answer,
74
- "metadata": {"model": model_used}
75
  })
76
  except Exception as e:
77
  return jsonify({"error": str(e)}), 500
 
19
  REPO_LOGIC = "Qwen/Qwen2.5-1.5B-Instruct-GGUF"
20
  FILE_LOGIC = "qwen2.5-1.5b-instruct-q4_k_m.gguf"
21
 
22
+ # 4. Maira Chat (Danube 3 500M) - FIXED FILENAME
23
  REPO_CHAT = "h2oai/h2o-danube3-500m-chat-GGUF"
24
+ FILE_CHAT = "h2o-danube3-500m-chat-Q4_K_M.gguf"
25
 
26
+ # 5. Maira Art (Granite 3.0 2B) - SWAPPED TO OPEN MODEL
27
+ REPO_ART = "bartowski/granite-3.0-2b-instruct-GGUF"
28
+ FILE_ART = "granite-3.0-2b-instruct-Q4_K_M.gguf"
29
 
30
  # --- Initialize All Brains ---
31
  print("🌌 Initializing Neural Cores...")
 
34
  maira_logic = MairaBrain(REPO_LOGIC, FILE_LOGIC)
35
  maira_chat = MairaBrain(REPO_CHAT, FILE_CHAT)
36
  maira_art = MairaBrain(REPO_ART, FILE_ART)
37
+ print("✅ All Cores Online. Creator: CyberCoder225")
38
 
39
  @app.route('/', methods=['GET'])
40
  def home():
41
  return jsonify({
42
  "status": "online",
43
  "version": "6.0 (Quintessence)",
44
+ "owner": "CyberCoder225",
45
+ "active_models": ["small", "medium", "qwen", "danube", "granite"]
46
  })
47
 
48
  @app.route('/chat', methods=['POST'])
 
63
  elif model_type == "danube":
64
  answer = maira_chat.get_response(user_id, user_input)
65
  model_used = "maira-chat"
66
+ elif model_type == "granite": # Updated tag name
67
  answer = maira_art.get_response(user_id, user_input)
68
  model_used = "maira-art"
69
  else:
70
  answer = maira_lite.get_response(user_id, user_input)
71
  model_used = "maira-lite"
72
+
73
  return jsonify({
74
  "maira": answer,
75
+ "metadata": {"model": model_used, "creator": "CyberCoder225"}
76
  })
77
  except Exception as e:
78
  return jsonify({"error": str(e)}), 500