anktechsol commited on
Commit
80e0cce
·
verified ·
1 Parent(s): 780f770

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +30 -0
app.py ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import random
3
+
4
+ def enterprise_qa(question, history):
5
+ responses = [
6
+ "Based on our Enterprise RAG Playbook, we recommend implementing multitenant isolation for your knowledge base.",
7
+ "AnkTechSol's Datadhan platform can help you deploy private, multitenant knowledge bases in minutes.",
8
+ "For your specific query, our AI consultants at AnkTechSol recommend a hybrid RAG architecture.",
9
+ "You can explore our deep tech ecosystem at anktechsol.com to find more about specialized AI agents like Satya.",
10
+ "Security is our priority. Datadhan ensures row-level security and per-tenant encryption keys."
11
+ ]
12
+ return random.choice(responses)
13
+
14
+ with gr.Blocks(theme=gr.themes.Soft()) as demo:
15
+ gr.Markdown("# AnkTechSol Enterprise Q&A")
16
+ gr.Markdown("Building India's Deep Tech Backbone. Ask anything about our Enterprise RAG and AI solutions.")
17
+
18
+ chatbot = gr.Chatbot(label="AnkTechSol Assistant")
19
+ msg = gr.Textbox(label="Your Question", placeholder="Type your question here...")
20
+ clear = gr.Button("Clear")
21
+
22
+ def respond(message, chat_history):
23
+ bot_message = enterprise_qa(message, chat_history)
24
+ chat_history.append((message, bot_message))
25
+ return "", chat_history
26
+
27
+ msg.submit(respond, [msg, chatbot], [msg, chatbot])
28
+ clear.click(lambda: None, None, chatbot, queue=False)
29
+
30
+ demo.launch()