Update README.md
Browse files
README.md
CHANGED
|
@@ -1,67 +1,10 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
def handle_chat(msg, history):
|
| 13 |
-
# Pure local chat logic
|
| 14 |
-
return history + [[msg, "📡 [LOCAL SQUAD] Message received. (Isolated Mode)"]]
|
| 15 |
-
|
| 16 |
-
with gr.Blocks(theme=gr.themes.Monochrome(), css=".chat-feed {height: 60vh !important;}") as demo:
|
| 17 |
-
|
| 18 |
-
# 1. THE HEADER (Identity & Support)
|
| 19 |
-
with gr.Row():
|
| 20 |
-
with gr.Column(scale=1, variant="panel"):
|
| 21 |
-
gr.Markdown("👤 **IDENTITY**")
|
| 22 |
-
profile_name = gr.Textbox(value="Loading...", interactive=True, show_label=False)
|
| 23 |
-
gr.Markdown("🏆 **RANK:** WARRIOR")
|
| 24 |
-
|
| 25 |
-
with gr.Column(scale=2):
|
| 26 |
-
gr.Markdown("<h1 style='text-align: center;'>🏔️ TERABITES™ HQ</h1>")
|
| 27 |
-
gr.Markdown("<p style='text-align: center;'>STATUS: <b>OFFLINE / ISOLATED</b></p>")
|
| 28 |
-
|
| 29 |
-
with gr.Column(scale=1, variant="panel"):
|
| 30 |
-
gr.Markdown("🎧 **GEMMA 3 SERVICE**")
|
| 31 |
-
support_in = gr.Textbox(placeholder="Ask about the UI...", show_label=False)
|
| 32 |
-
support_out = gr.Markdown("*Ready*")
|
| 33 |
-
|
| 34 |
-
gr.Markdown("---")
|
| 35 |
-
|
| 36 |
-
# 2. THE BODY (Groups & Chat)
|
| 37 |
-
with gr.Row():
|
| 38 |
-
# Sidebar
|
| 39 |
-
with gr.Column(scale=1):
|
| 40 |
-
gr.Markdown("### 👥 SQUADS")
|
| 41 |
-
group_sel = gr.Radio(["🌐 MAIN (Public)", "🛠️ SQUAD-ALPHA"], value="🌐 MAIN (Public)", label=None)
|
| 42 |
-
|
| 43 |
-
with gr.Accordion("⚙️ SETTINGS", open=False):
|
| 44 |
-
gr.Button("Invite Link (Testing)")
|
| 45 |
-
gr.Button("Delete Squad (Disabled)")
|
| 46 |
-
|
| 47 |
-
# The Big Gap (Chat)
|
| 48 |
-
with gr.Column(scale=4):
|
| 49 |
-
chatbot = gr.Chatbot(label=None, show_label=False, elem_classes="chat-feed")
|
| 50 |
-
|
| 51 |
-
# 3. THE PROMPT (Bottom Center)
|
| 52 |
-
with gr.Row():
|
| 53 |
-
msg_in = gr.Textbox(placeholder="Type a message...", scale=9, show_label=False)
|
| 54 |
-
send_btn = gr.Button("SUI", scale=1, variant="primary")
|
| 55 |
-
|
| 56 |
-
# --- LOCAL CONNECTIONS ONLY ---
|
| 57 |
-
support_in.submit(gemma_3_local_service, support_in, support_out)
|
| 58 |
-
send_btn.click(handle_chat, [msg_in, chatbot], [chatbot])
|
| 59 |
-
|
| 60 |
-
# HF Auth Profile Sync (Display only)
|
| 61 |
-
def sync_identity(profile: gr.OAuthProfile | None):
|
| 62 |
-
if profile: return profile.name
|
| 63 |
-
return "Guest_Warrior"
|
| 64 |
-
|
| 65 |
-
demo.load(sync_identity, None, profile_name)
|
| 66 |
-
|
| 67 |
-
demo.launch()
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: TeraBites-Empire-Core
|
| 3 |
+
emoji: 🪐
|
| 4 |
+
colorFrom: indigo
|
| 5 |
+
colorTo: gray
|
| 6 |
+
sdk: gradio
|
| 7 |
+
sdk_version: 5.0.0
|
| 8 |
+
app_file: app.py
|
| 9 |
+
pinned: false
|
| 10 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|