Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| import random | |
| def enterprise_qa(question, history): | |
| responses = [ | |
| "Based on our Enterprise RAG Playbook, we recommend implementing multitenant isolation for your knowledge base.", | |
| "AnkTechSol's Datadhan platform can help you deploy private, multitenant knowledge bases in minutes.", | |
| "For your specific query, our AI consultants at AnkTechSol recommend a hybrid RAG architecture.", | |
| "You can explore our deep tech ecosystem at anktechsol.com to find more about specialized AI agents like Satya.", | |
| "Security is our priority. Datadhan ensures row-level security and per-tenant encryption keys." | |
| ] | |
| return random.choice(responses) | |
| with gr.Blocks(theme=gr.themes.Soft()) as demo: | |
| gr.Markdown("# AnkTechSol Enterprise Q&A") | |
| gr.Markdown("Building India's Deep Tech Backbone. Ask anything about our Enterprise RAG and AI solutions.") | |
| chatbot = gr.Chatbot(label="AnkTechSol Assistant") | |
| msg = gr.Textbox(label="Your Question", placeholder="Type your question here...") | |
| clear = gr.Button("Clear") | |
| def respond(message, chat_history): | |
| bot_message = enterprise_qa(message, chat_history) | |
| chat_history.append((message, bot_message)) | |
| return "", chat_history | |
| msg.submit(respond, [msg, chatbot], [msg, chatbot]) | |
| clear.click(lambda: None, None, chatbot, queue=False) | |
| demo.launch() |