import gradio as gr import os, sys BASE_DIR = os.path.dirname(os.path.abspath(__file__)) UTILS_DIR = os.path.join(BASE_DIR, "utils") if UTILS_DIR not in sys.path: sys.path.insert(0, UTILS_DIR) from backend import run_llm def create_chat_interface(): def chat_fn(message, history): reply = run_llm(message) return reply return gr.ChatInterface(chat_fn, title="Omniscient Chatbot")