Spaces:
Sleeping
Sleeping
Commit ·
2c12d9b
1
Parent(s): 3b04750
history display
Browse files
app.py
CHANGED
|
@@ -100,6 +100,7 @@ with gr.Blocks() as demo:
|
|
| 100 |
output_log = gr.Markdown("_Awaiting local environment staging completion..._")
|
| 101 |
|
| 102 |
# --- UI ROUTING HANDLERS ---
|
|
|
|
| 103 |
def evaluate_login_access(password_attempt):
|
| 104 |
"""Processes the state gate router logic step when the entry button is pushed."""
|
| 105 |
target_password = get_secret_password()
|
|
@@ -115,6 +116,43 @@ with gr.Blocks() as demo:
|
|
| 115 |
# 3. Securely query history tracking arrays
|
| 116 |
loaded_samples = load_history()
|
| 117 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 118 |
return (
|
| 119 |
gr.update(visible=False), # Hide login layout
|
| 120 |
gr.update(visible=True), # Reveal main application workspace
|
|
|
|
| 100 |
output_log = gr.Markdown("_Awaiting local environment staging completion..._")
|
| 101 |
|
| 102 |
# --- UI ROUTING HANDLERS ---
|
| 103 |
+
"""
|
| 104 |
def evaluate_login_access(password_attempt):
|
| 105 |
"""Processes the state gate router logic step when the entry button is pushed."""
|
| 106 |
target_password = get_secret_password()
|
|
|
|
| 116 |
# 3. Securely query history tracking arrays
|
| 117 |
loaded_samples = load_history()
|
| 118 |
|
| 119 |
+
return (
|
| 120 |
+
gr.update(visible=False), # Hide login layout
|
| 121 |
+
gr.update(visible=True), # Reveal main application workspace
|
| 122 |
+
gr.update(samples=loaded_samples) # Update sidebar list view dataset target
|
| 123 |
+
)
|
| 124 |
+
"""
|
| 125 |
+
|
| 126 |
+
# --- UI ROUTING HANDLERS ---
|
| 127 |
+
def evaluate_login_access(password_attempt):
|
| 128 |
+
"""Processes the state gate router logic step when the entry button is pushed."""
|
| 129 |
+
target_password = get_secret_password()
|
| 130 |
+
|
| 131 |
+
# Guardrail string conversion
|
| 132 |
+
clean_attempt = str(password_attempt).strip() if password_attempt is not None else ""
|
| 133 |
+
|
| 134 |
+
# ==================================================================
|
| 135 |
+
# 📊 RUNTIME AGENT DEEP TELEMETRY LOGS
|
| 136 |
+
# ==================================================================
|
| 137 |
+
print("\n==================================================")
|
| 138 |
+
print("🔓 CODERG LOGIN ATTEMPT METRICS:")
|
| 139 |
+
print(f" -> Raw input object type: {type(password_attempt)}")
|
| 140 |
+
print(f" -> Length of user input in UI textbox: {len(clean_attempt)}")
|
| 141 |
+
print(f" -> Length of target password from HF Secret: {len(target_password)}")
|
| 142 |
+
print(f" -> Do they match exactly in memory? {clean_attempt == target_password}")
|
| 143 |
+
print("==================================================\n")
|
| 144 |
+
# ==================================================================
|
| 145 |
+
|
| 146 |
+
# 1. Reject clearly incorrect inputs if an environment variable is set
|
| 147 |
+
if target_password and clean_attempt and clean_attempt != target_password:
|
| 148 |
+
raise gr.Error("❌ Invalid security token entered. Access to environment denied.")
|
| 149 |
+
|
| 150 |
+
# 2. Run verification to unlock global storage access context natively
|
| 151 |
+
verify_and_unlock(clean_attempt)
|
| 152 |
+
|
| 153 |
+
# 3. Securely query history tracking arrays
|
| 154 |
+
loaded_samples = load_history()
|
| 155 |
+
|
| 156 |
return (
|
| 157 |
gr.update(visible=False), # Hide login layout
|
| 158 |
gr.update(visible=True), # Reveal main application workspace
|