Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1067,7 +1067,7 @@ Upload a PDF, TXT, or DOCX file to get a concise, structured summary of its cont
|
|
| 1067 |
"""
|
| 1068 |
demo_description5 = """
|
| 1069 |
**Context**:
|
| 1070 |
-
This demo presents a GPT-style Multi-Agent AI Assistant, built with **LangChain, CrewAI**, and **RAG (Retrieval-Augmented Generation)**.The system automatically understands your intent and routes the query to the best expert agent, enabling dynamic **multi-agent orchestration**.
|
| 1071 |
|
| 1072 |
**Supported features**:
|
| 1073 |
- 📄 **Document Summarisation** (PDF, DOCX, TXT)
|
|
@@ -1087,27 +1087,29 @@ This demo presents a GPT-style Multi-Agent AI Assistant, built with **LangChain,
|
|
| 1087 |
6. If I earn $15 per hour and work 8 hours a day for 5 days, how much will I earn? | What is 5 * 22.5 / sin(45) | 3^3 + 4^2 | Calculate 25 * log(1000) | What is the square root of 144 *(→ Math Agent)*
|
| 1088 |
7. Who are you? | What can you do? | What is the meaning of life? *(→ General Chat Agent)*
|
| 1089 |
|
| 1090 |
-
Feel free to upload a document and ask related questions, or just type a question directly—no file upload required.
|
| 1091 |
-
*Note: CSV file analysis and auto visualisation is coming soon.*
|
| 1092 |
"""
|
| 1093 |
|
| 1094 |
demo = gr.TabbedInterface(
|
| 1095 |
interface_list=[
|
| 1096 |
gr.Interface(
|
| 1097 |
-
fn=
|
| 1098 |
-
inputs=
|
|
|
|
|
|
|
|
|
|
| 1099 |
outputs="text",
|
| 1100 |
-
title="
|
| 1101 |
allow_flagging="never",
|
| 1102 |
-
description=
|
| 1103 |
),
|
| 1104 |
gr.Interface(
|
| 1105 |
-
fn=
|
| 1106 |
-
inputs="
|
| 1107 |
outputs="text",
|
| 1108 |
-
title="
|
| 1109 |
allow_flagging="never",
|
| 1110 |
-
description=
|
| 1111 |
),
|
| 1112 |
gr.Interface(
|
| 1113 |
fn=upload_and_chat,
|
|
@@ -1118,31 +1120,28 @@ demo = gr.TabbedInterface(
|
|
| 1118 |
description=demo_description3
|
| 1119 |
),
|
| 1120 |
gr.Interface(
|
| 1121 |
-
fn=
|
| 1122 |
-
inputs=
|
| 1123 |
outputs="text",
|
| 1124 |
-
title="
|
| 1125 |
allow_flagging="never",
|
| 1126 |
-
description=
|
| 1127 |
),
|
| 1128 |
gr.Interface(
|
| 1129 |
-
fn=
|
| 1130 |
-
inputs=
|
| 1131 |
-
gr.Textbox(label="Enter your query"),
|
| 1132 |
-
gr.File(label="Upload file (CSV, PDF, TXT, DOCX)", file_count="single")
|
| 1133 |
-
],
|
| 1134 |
outputs="text",
|
| 1135 |
-
title="
|
| 1136 |
allow_flagging="never",
|
| 1137 |
-
description=
|
| 1138 |
-
)
|
| 1139 |
],
|
| 1140 |
tab_names=[
|
| 1141 |
-
"
|
| 1142 |
-
"Biden Q&A (GPT-4 RAG)",
|
| 1143 |
-
"Your Docs Q&A (Upload + GPT-4 RAG)",
|
| 1144 |
"Document Summarisation",
|
| 1145 |
-
"
|
|
|
|
|
|
|
| 1146 |
],
|
| 1147 |
title="Smart RAG + Multi-Agent Assistant (with Web + Document AI)"
|
| 1148 |
)
|
|
|
|
| 1067 |
"""
|
| 1068 |
demo_description5 = """
|
| 1069 |
**Context**:
|
| 1070 |
+
This demo presents a GPT-style Multi-Agent AI Assistant, built with **LangChain, CrewAI**, and **RAG (Retrieval-Augmented Generation)**. The system automatically understands your intent and routes the query to the best expert agent, enabling dynamic **multi-agent orchestration**.
|
| 1071 |
|
| 1072 |
**Supported features**:
|
| 1073 |
- 📄 **Document Summarisation** (PDF, DOCX, TXT)
|
|
|
|
| 1087 |
6. If I earn $15 per hour and work 8 hours a day for 5 days, how much will I earn? | What is 5 * 22.5 / sin(45) | 3^3 + 4^2 | Calculate 25 * log(1000) | What is the square root of 144 *(→ Math Agent)*
|
| 1088 |
7. Who are you? | What can you do? | What is the meaning of life? *(→ General Chat Agent)*
|
| 1089 |
|
| 1090 |
+
Feel free to upload a document and ask related questions, or just type a question directly—no file upload required. *Note: CSV file analysis and auto visualisation is coming soon.*
|
|
|
|
| 1091 |
"""
|
| 1092 |
|
| 1093 |
demo = gr.TabbedInterface(
|
| 1094 |
interface_list=[
|
| 1095 |
gr.Interface(
|
| 1096 |
+
fn=multi_agent_chat_advanced,
|
| 1097 |
+
inputs=[
|
| 1098 |
+
gr.Textbox(label="Enter your query"),
|
| 1099 |
+
gr.File(label="Upload file (CSV, PDF, TXT, DOCX)", file_count="single")
|
| 1100 |
+
],
|
| 1101 |
outputs="text",
|
| 1102 |
+
title="Multi-Agent AI Assistant",
|
| 1103 |
allow_flagging="never",
|
| 1104 |
+
description=demo_description5
|
| 1105 |
),
|
| 1106 |
gr.Interface(
|
| 1107 |
+
fn=document_summarize,
|
| 1108 |
+
inputs=[gr.File(label="Upload PDF, TXT, or DOCX")],
|
| 1109 |
outputs="text",
|
| 1110 |
+
title="Document Summarisation",
|
| 1111 |
allow_flagging="never",
|
| 1112 |
+
description=demo_description4
|
| 1113 |
),
|
| 1114 |
gr.Interface(
|
| 1115 |
fn=upload_and_chat,
|
|
|
|
| 1120 |
description=demo_description3
|
| 1121 |
),
|
| 1122 |
gr.Interface(
|
| 1123 |
+
fn=rag_gpt4_qa,
|
| 1124 |
+
inputs="text",
|
| 1125 |
outputs="text",
|
| 1126 |
+
title="Biden Q&A (GPT-4 RAG)",
|
| 1127 |
allow_flagging="never",
|
| 1128 |
+
description=demo_description2
|
| 1129 |
),
|
| 1130 |
gr.Interface(
|
| 1131 |
+
fn=rag_llama_qa,
|
| 1132 |
+
inputs="text",
|
|
|
|
|
|
|
|
|
|
| 1133 |
outputs="text",
|
| 1134 |
+
title="Biden Q&A (LLaMA RAG)",
|
| 1135 |
allow_flagging="never",
|
| 1136 |
+
description=demo_description
|
| 1137 |
+
),
|
| 1138 |
],
|
| 1139 |
tab_names=[
|
| 1140 |
+
"Multi-Agent AI Assistant",
|
|
|
|
|
|
|
| 1141 |
"Document Summarisation",
|
| 1142 |
+
"Your Docs Q&A (Upload + GPT-4 RAG)",
|
| 1143 |
+
"Biden Q&A (GPT-4 RAG)",
|
| 1144 |
+
"Biden Q&A (LLaMA RAG)"
|
| 1145 |
],
|
| 1146 |
title="Smart RAG + Multi-Agent Assistant (with Web + Document AI)"
|
| 1147 |
)
|