Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -534,9 +534,79 @@ def handle_refresh_space_status(hf_api_key_ui, ui_owner_name, ui_space_name):
|
|
| 534 |
for key, val in status.items():
|
| 535 |
md += f"- **{key.replace('_', ' ').title()}:** `{val}`\n"
|
| 536 |
return md
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 537 |
|
| 538 |
# --- Gradio UI Definition ---
|
| 539 |
-
with gr.Blocks(theme=gr.themes.Soft(), css=".gradio-container {background: linear-gradient(to bottom right, #eff6ff, #dbeafe);}") as demo:
|
|
|
|
| 540 |
gr.Markdown("# 🤖 AI-Powered Hugging Face Space Builder")
|
| 541 |
gr.Markdown("Use an AI assistant to create, modify, build, and manage your Hugging Face Spaces directly from this interface.")
|
| 542 |
|
|
|
|
| 534 |
for key, val in status.items():
|
| 535 |
md += f"- **{key.replace('_', ' ').title()}:** `{val}`\n"
|
| 536 |
return md
|
| 537 |
+
custom_theme = gr.themes.Base(
|
| 538 |
+
primary_hue="teal",
|
| 539 |
+
secondary_hue="purple",
|
| 540 |
+
neutral_hue="zinc",
|
| 541 |
+
text_size="sm",
|
| 542 |
+
spacing_size="md",
|
| 543 |
+
radius_size="sm",
|
| 544 |
+
font=["System UI", "sans-serif"]
|
| 545 |
+
)
|
| 546 |
+
|
| 547 |
+
custom_css = """
|
| 548 |
+
body {
|
| 549 |
+
background: linear-gradient(to bottom right, #2c3e50, #34495e);
|
| 550 |
+
color: #ecf0f1;
|
| 551 |
+
}
|
| 552 |
+
.gradio-container {
|
| 553 |
+
background: transparent !important;
|
| 554 |
+
}
|
| 555 |
+
.gr-box, .gr-panel, .gr-pill {
|
| 556 |
+
background-color: rgba(44, 62, 80, 0.8) !important;
|
| 557 |
+
border-color: rgba(189, 195, 199, 0.2) !important;
|
| 558 |
+
}
|
| 559 |
+
.gr-textbox, .gr-dropdown, .gr-button, .gr-code, .gr-chat-message {
|
| 560 |
+
border-color: rgba(189, 195, 199, 0.3) !important;
|
| 561 |
+
background-color: rgba(52, 73, 94, 0.9) !important;
|
| 562 |
+
color: #ecf0f1 !important;
|
| 563 |
+
}
|
| 564 |
+
.gr-button.gr-button-primary {
|
| 565 |
+
background-color: #1abc9c !important;
|
| 566 |
+
color: white !important;
|
| 567 |
+
border-color: #16a085 !important;
|
| 568 |
+
}
|
| 569 |
+
.gr-button.gr-button-secondary {
|
| 570 |
+
background-color: #9b59b6 !important;
|
| 571 |
+
color: white !important;
|
| 572 |
+
border-color: #8e44ad !important;
|
| 573 |
+
}
|
| 574 |
+
.gr-button.gr-button-stop {
|
| 575 |
+
background-color: #e74c3c !important;
|
| 576 |
+
color: white !important;
|
| 577 |
+
border-color: #c0392b !important;
|
| 578 |
+
}
|
| 579 |
+
.gr-markdown {
|
| 580 |
+
background-color: rgba(44, 62, 80, 0.7) !important;
|
| 581 |
+
padding: 10px;
|
| 582 |
+
border-radius: 5px;
|
| 583 |
+
}
|
| 584 |
+
.gr-markdown h1, .gr-markdown h2, .gr-markdown h3, .gr-markdown h4, .gr-markdown h5, .gr-markdown h6 {
|
| 585 |
+
color: #ecf0f1 !important;
|
| 586 |
+
border-bottom-color: rgba(189, 195, 199, 0.3) !important;
|
| 587 |
+
}
|
| 588 |
+
.gr-markdown pre code {
|
| 589 |
+
background-color: rgba(52, 73, 94, 0.95) !important;
|
| 590 |
+
border-color: rgba(189, 195, 199, 0.3) !important;
|
| 591 |
+
}
|
| 592 |
+
.gr-chatbot {
|
| 593 |
+
background-color: rgba(44, 62, 80, 0.7) !important;
|
| 594 |
+
border-color: rgba(189, 195, 199, 0.2) !important;
|
| 595 |
+
}
|
| 596 |
+
.gr-chatbot .message {
|
| 597 |
+
background-color: rgba(52, 73, 94, 0.9) !important;
|
| 598 |
+
color: #ecf0f1 !important;
|
| 599 |
+
border-color: rgba(189, 195, 199, 0.3) !important;
|
| 600 |
+
}
|
| 601 |
+
.gr-chatbot .message.user {
|
| 602 |
+
background-color: rgba(46, 204, 113, 0.9) !important;
|
| 603 |
+
color: black !important;
|
| 604 |
+
}
|
| 605 |
+
"""
|
| 606 |
|
| 607 |
# --- Gradio UI Definition ---
|
| 608 |
+
#with gr.Blocks(theme=gr.themes.Soft(), css=".gradio-container {background: linear-gradient(to bottom right, #eff6ff, #dbeafe);}") as demo:
|
| 609 |
+
with gr.Blocks(theme=custom_theme, css=custom_css) as demo:
|
| 610 |
gr.Markdown("# 🤖 AI-Powered Hugging Face Space Builder")
|
| 611 |
gr.Markdown("Use an AI assistant to create, modify, build, and manage your Hugging Face Spaces directly from this interface.")
|
| 612 |
|