Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -482,6 +482,8 @@ def create_interface():
|
|
482 |
border: none !important;
|
483 |
margin-bottom: 1rem;
|
484 |
overflow-y: auto !important;
|
|
|
|
|
485 |
}
|
486 |
|
487 |
/* Input area */
|
@@ -563,7 +565,7 @@ def create_interface():
|
|
563 |
with gr.Column():
|
564 |
gr.HTML("""
|
565 |
<div class="header">
|
566 |
-
<h1
|
567 |
<p>Upload documents and ask questions - powered by Multi-Agent Architecture</p>
|
568 |
</div>
|
569 |
""")
|
@@ -589,19 +591,19 @@ def create_interface():
|
|
589 |
elem_classes=["primary-btn"]
|
590 |
)
|
591 |
|
592 |
-
gr.Markdown("### βΉοΈ Architecture")
|
593 |
-
gr.Markdown("""
|
594 |
-
**Multi-Agent System:**
|
595 |
-
- π **IngestionAgent**: Document parsing
|
596 |
-
- π **RetrievalAgent**: Semantic search
|
597 |
-
- π€ **LLMAgent**: Response generation
|
598 |
-
- π― **CoordinatorAgent**: Workflow orchestration
|
599 |
|
600 |
-
**Features:**
|
601 |
-
- Streaming responses
|
602 |
-
- Multi-format support
|
603 |
-
- Context-aware answers
|
604 |
-
""")
|
605 |
|
606 |
# Right side - Chat interface
|
607 |
with gr.Column(scale=2):
|
@@ -642,7 +644,7 @@ def create_interface():
|
|
642 |
"What are the recommendations?"
|
643 |
],
|
644 |
inputs=msg_input,
|
645 |
-
label="
|
646 |
)
|
647 |
|
648 |
# State to track document processing
|
@@ -671,7 +673,7 @@ def create_interface():
|
|
671 |
success_html = """
|
672 |
<div style="background: rgba(76, 175, 80, 0.1); border: 1px solid rgba(76, 175, 80, 0.3);
|
673 |
border-radius: 8px; padding: 0.75rem; color: #4caf50; text-align: center;">
|
674 |
-
|
675 |
</div>
|
676 |
"""
|
677 |
return gr.update(value=success_html, visible=True), True
|
@@ -689,7 +691,7 @@ def create_interface():
|
|
689 |
if not doc_ready:
|
690 |
# Show error message
|
691 |
history.append({"role": "user", "content": message})
|
692 |
-
history.append({"role": "assistant", "content": "
|
693 |
return history, ""
|
694 |
|
695 |
if not message.strip():
|
|
|
482 |
border: none !important;
|
483 |
margin-bottom: 1rem;
|
484 |
overflow-y: auto !important;
|
485 |
+
box-shadow: 0 0 12px rgba(255, 193, 7, 0.1);
|
486 |
+
|
487 |
}
|
488 |
|
489 |
/* Input area */
|
|
|
565 |
with gr.Column():
|
566 |
gr.HTML("""
|
567 |
<div class="header">
|
568 |
+
<h1>Agentic RAG Assistant</h1>
|
569 |
<p>Upload documents and ask questions - powered by Multi-Agent Architecture</p>
|
570 |
</div>
|
571 |
""")
|
|
|
591 |
elem_classes=["primary-btn"]
|
592 |
)
|
593 |
|
594 |
+
# gr.Markdown("### βΉοΈ Architecture")
|
595 |
+
# gr.Markdown("""
|
596 |
+
# **Multi-Agent System:**
|
597 |
+
# - π **IngestionAgent**: Document parsing
|
598 |
+
# - π **RetrievalAgent**: Semantic search
|
599 |
+
# - π€ **LLMAgent**: Response generation
|
600 |
+
# - π― **CoordinatorAgent**: Workflow orchestration
|
601 |
|
602 |
+
# **Features:**
|
603 |
+
# - Streaming responses
|
604 |
+
# - Multi-format support
|
605 |
+
# - Context-aware answers
|
606 |
+
# """)
|
607 |
|
608 |
# Right side - Chat interface
|
609 |
with gr.Column(scale=2):
|
|
|
644 |
"What are the recommendations?"
|
645 |
],
|
646 |
inputs=msg_input,
|
647 |
+
label="Example Questions"
|
648 |
)
|
649 |
|
650 |
# State to track document processing
|
|
|
673 |
success_html = """
|
674 |
<div style="background: rgba(76, 175, 80, 0.1); border: 1px solid rgba(76, 175, 80, 0.3);
|
675 |
border-radius: 8px; padding: 0.75rem; color: #4caf50; text-align: center;">
|
676 |
+
Documents processed successfully! You can now ask questions.
|
677 |
</div>
|
678 |
"""
|
679 |
return gr.update(value=success_html, visible=True), True
|
|
|
691 |
if not doc_ready:
|
692 |
# Show error message
|
693 |
history.append({"role": "user", "content": message})
|
694 |
+
history.append({"role": "assistant", "content": " Please upload and process documents first."})
|
695 |
return history, ""
|
696 |
|
697 |
if not message.strip():
|