Spaces:
Runtime error
Runtime error
| import gradio as gr | |
| from enhanced_rag_chatbot import get_chatbot | |
| chatbot = get_chatbot() | |
| # Simple chat function for Gradio | |
| def chat_fn(message, mode="extract"): | |
| try: | |
| response = chatbot.chat(message, mode=mode) | |
| return response | |
| except Exception as e: | |
| return f"β Error: {str(e)}" | |
| iface = gr.ChatInterface( | |
| fn=lambda message, history: chat_fn(message), | |
| title="Rackspace Knowledge Assistant", | |
| description="Ask questions about Rackspace documentation. Uses Groq API and enhanced RAG retrieval.", | |
| theme="default", | |
| ) | |
| iface.launch() | |