Spaces:
Sleeping
Sleeping
Commit
·
9362424
1
Parent(s):
cf4a106
Polish UI with kid-friendly colorful workflow guide
Browse files- apps/web/app.py +22 -5
apps/web/app.py
CHANGED
|
@@ -140,13 +140,30 @@ def admin_ingest(files, use_sample):
|
|
| 140 |
# Initialize on module load
|
| 141 |
init_services()
|
| 142 |
|
| 143 |
-
with gr.Blocks(title="RAG Assistant") as demo:
|
| 144 |
-
gr.Markdown("# 🤖
|
| 145 |
-
gr.Markdown("Build your own Knowledge Base and chat with it locally or via API.")
|
| 146 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 147 |
with gr.Tabs():
|
| 148 |
# Tab 1: Knowledge Base (Ingestion)
|
| 149 |
-
with gr.Tab("1. Knowledge Base"):
|
| 150 |
gr.Markdown("### Step 1: Choose Your Data Source")
|
| 151 |
|
| 152 |
with gr.Row():
|
|
@@ -176,7 +193,7 @@ with gr.Blocks(title="RAG Assistant") as demo:
|
|
| 176 |
)
|
| 177 |
|
| 178 |
# Tab 2: Chat Interface
|
| 179 |
-
with gr.Tab("2. Chat
|
| 180 |
gr.Markdown("### Step 3: Ask Questions")
|
| 181 |
|
| 182 |
with gr.Accordion("⚙️ Model Settings", open=True):
|
|
|
|
| 140 |
# Initialize on module load
|
| 141 |
init_services()
|
| 142 |
|
| 143 |
+
with gr.Blocks(title="RAG Knowledge Assistant", theme=gr.themes.Soft()) as demo:
|
| 144 |
+
gr.Markdown("# 🤖 Super Smart Knowledge Assistant")
|
|
|
|
| 145 |
|
| 146 |
+
with gr.Row():
|
| 147 |
+
gr.HTML("""
|
| 148 |
+
<div style="background-color: #f0f9ff; padding: 20px; border-radius: 10px; border: 2px solid #3b82f6;">
|
| 149 |
+
<h3 style="color: #1e40af; margin-top: 0;">👋 Hi! I'm your AI Helper!</h3>
|
| 150 |
+
<p style="font-size: 16px;">I can learn from <b>ANY</b> document you give me. creating your own Google is easy as 1-2-3!</p>
|
| 151 |
+
<div style="display: flex; gap: 20px; margin-top: 15px;">
|
| 152 |
+
<div style="flex: 1; background: white; padding: 15px; border-radius: 8px; border-left: 5px solid #10b981;">
|
| 153 |
+
<h4 style="color: #059669;">Step 1: Teach Me 🍎</h4>
|
| 154 |
+
<p>Go to <b>'1. Teach Me'</b> tab.<br>Upload a PDF or just click "Use Sample Data".<br>Then hit the big <b>🚀 Ingest</b> button!</p>
|
| 155 |
+
</div>
|
| 156 |
+
<div style="flex: 1; background: white; padding: 15px; border-radius: 8px; border-left: 5px solid #8b5cf6;">
|
| 157 |
+
<h4 style="color: #7c3aed;">Step 2: Chat with Me 💬</h4>
|
| 158 |
+
<p>Go to <b>'2. Talk to Me'</b> tab.<br>Pick your brain (OpenAI, Gemini, or Local).<br>Ask me anything about what you taught me!</p>
|
| 159 |
+
</div>
|
| 160 |
+
</div>
|
| 161 |
+
</div>
|
| 162 |
+
""")
|
| 163 |
+
|
| 164 |
with gr.Tabs():
|
| 165 |
# Tab 1: Knowledge Base (Ingestion)
|
| 166 |
+
with gr.Tab("1. Teach Me (Knowledge Base)"):
|
| 167 |
gr.Markdown("### Step 1: Choose Your Data Source")
|
| 168 |
|
| 169 |
with gr.Row():
|
|
|
|
| 193 |
)
|
| 194 |
|
| 195 |
# Tab 2: Chat Interface
|
| 196 |
+
with gr.Tab("2. Talk to Me (Chat)"):
|
| 197 |
gr.Markdown("### Step 3: Ask Questions")
|
| 198 |
|
| 199 |
with gr.Accordion("⚙️ Model Settings", open=True):
|