Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -109,7 +109,12 @@ button[aria-selected="false"]:hover {
|
|
| 109 |
box-shadow: none !important;
|
| 110 |
}
|
| 111 |
|
| 112 |
-
.gr-tab-nav button:hover
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
button[aria-selected="false"]:hover * {
|
| 114 |
color: #ffffff !important;
|
| 115 |
}
|
|
@@ -289,9 +294,30 @@ label, .gr-form > div > label, .gr-box, .gr-panel {
|
|
| 289 |
color: var(--text) !important;
|
| 290 |
}
|
| 291 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 292 |
.dashboard-white-text .gr-markdown,
|
| 293 |
.dashboard-white-text .gr-markdown * {
|
| 294 |
-
color:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 295 |
}
|
| 296 |
|
| 297 |
.dashboard-white-text {
|
|
@@ -303,21 +329,6 @@ label, .gr-form > div > label, .gr-box, .gr-panel {
|
|
| 303 |
line-height: 1.75 !important;
|
| 304 |
}
|
| 305 |
|
| 306 |
-
.status-card {
|
| 307 |
-
background: rgba(255,255,255,0.92);
|
| 308 |
-
border: 1px solid rgba(255,255,255,0.8);
|
| 309 |
-
border-radius: 16px;
|
| 310 |
-
padding: 14px 16px;
|
| 311 |
-
margin-bottom: 14px;
|
| 312 |
-
box-shadow: 0 8px 20px rgba(11, 5, 43, 0.08);
|
| 313 |
-
}
|
| 314 |
-
|
| 315 |
-
.status-card p {
|
| 316 |
-
margin: 0;
|
| 317 |
-
color: var(--text);
|
| 318 |
-
font-weight: 700;
|
| 319 |
-
}
|
| 320 |
-
|
| 321 |
@media (max-width: 900px) {
|
| 322 |
.hero-card {
|
| 323 |
grid-template-columns: 1fr;
|
|
@@ -814,14 +825,6 @@ Instructions:
|
|
| 814 |
"""
|
| 815 |
|
| 816 |
|
| 817 |
-
def get_llm_status_text():
|
| 818 |
-
if not HF_API_KEY:
|
| 819 |
-
return "LLM status: fallback active because no HF_API_KEY was found."
|
| 820 |
-
if InferenceClient is None:
|
| 821 |
-
return "LLM status: fallback active because huggingface_hub could not be imported."
|
| 822 |
-
return f"LLM status: enabled. Model = {MODEL_NAME}"
|
| 823 |
-
|
| 824 |
-
|
| 825 |
def ask_ai(question, history, analysis_state):
|
| 826 |
if not question or not question.strip():
|
| 827 |
return history, ""
|
|
@@ -952,8 +955,6 @@ with gr.Blocks(title="AI Coworking Space Pricing Optimizer") as demo:
|
|
| 952 |
|
| 953 |
with gr.Tab('"AI" Dashboard'):
|
| 954 |
with gr.Group(elem_classes=["panel-card", "ai-panel"]):
|
| 955 |
-
gr.HTML(f'<div class="status-card"><p>{get_llm_status_text()}</p></div>')
|
| 956 |
-
|
| 957 |
gr.Markdown(
|
| 958 |
"""
|
| 959 |
### Ask the Coworking Strategy Assistant
|
|
|
|
| 109 |
box-shadow: none !important;
|
| 110 |
}
|
| 111 |
|
| 112 |
+
.gr-tab-nav button:hover,
|
| 113 |
+
.gr-tab-nav button:hover span,
|
| 114 |
+
.gr-tab-nav button:hover p,
|
| 115 |
+
.gr-tab-nav button:hover div,
|
| 116 |
+
.gr-tab-nav button:hover label,
|
| 117 |
+
button[aria-selected="false"]:hover,
|
| 118 |
button[aria-selected="false"]:hover * {
|
| 119 |
color: #ffffff !important;
|
| 120 |
}
|
|
|
|
| 294 |
color: var(--text) !important;
|
| 295 |
}
|
| 296 |
|
| 297 |
+
/* keep dashboard summary text white */
|
| 298 |
+
.dashboard-white-text,
|
| 299 |
+
.dashboard-white-text * {
|
| 300 |
+
color: #ffffff !important;
|
| 301 |
+
}
|
| 302 |
+
|
| 303 |
.dashboard-white-text .gr-markdown,
|
| 304 |
.dashboard-white-text .gr-markdown * {
|
| 305 |
+
color: #ffffff !important;
|
| 306 |
+
}
|
| 307 |
+
|
| 308 |
+
.dashboard-white-text h1,
|
| 309 |
+
.dashboard-white-text h2,
|
| 310 |
+
.dashboard-white-text h3,
|
| 311 |
+
.dashboard-white-text h4,
|
| 312 |
+
.dashboard-white-text h5,
|
| 313 |
+
.dashboard-white-text h6,
|
| 314 |
+
.dashboard-white-text strong,
|
| 315 |
+
.dashboard-white-text li,
|
| 316 |
+
.dashboard-white-text p,
|
| 317 |
+
.dashboard-white-text span,
|
| 318 |
+
.dashboard-white-text ul,
|
| 319 |
+
.dashboard-white-text ol {
|
| 320 |
+
color: #ffffff !important;
|
| 321 |
}
|
| 322 |
|
| 323 |
.dashboard-white-text {
|
|
|
|
| 329 |
line-height: 1.75 !important;
|
| 330 |
}
|
| 331 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 332 |
@media (max-width: 900px) {
|
| 333 |
.hero-card {
|
| 334 |
grid-template-columns: 1fr;
|
|
|
|
| 825 |
"""
|
| 826 |
|
| 827 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 828 |
def ask_ai(question, history, analysis_state):
|
| 829 |
if not question or not question.strip():
|
| 830 |
return history, ""
|
|
|
|
| 955 |
|
| 956 |
with gr.Tab('"AI" Dashboard'):
|
| 957 |
with gr.Group(elem_classes=["panel-card", "ai-panel"]):
|
|
|
|
|
|
|
| 958 |
gr.Markdown(
|
| 959 |
"""
|
| 960 |
### Ask the Coworking Strategy Assistant
|