Spaces:
Sleeping
Sleeping
Upload openmark/ui/app.py with huggingface_hub
Browse files29 unmodified lines303132333435363763 unmodified lines1011021031041051061071 unmodified line10911011111211311411529 unmodified linesif not message.strip():return history, ""response = ask(_agent, message, thread_id=thread_id or "default")history.append({"role": "user", "content": message})history.append({"role": "assistant", "content": response})return history, ""63 unmodified linesdef build_ui():categories = ["All"] + config.CATEGORIESwith gr.Blocks(title="OpenMark", theme=gr.themes.Soft()) as app:gr.Markdown("# OpenMark — Your Personal Knowledge Graph")with gr.Tabs():1 unmodified line# Tab 1: Chatwith gr.Tab("Chat"):thread = gr.Textbox(value="default", label="Session ID", scale=1)chatbot = gr.Chatbot(type="messages", height=500)msg_box = gr.Textbox(placeholder="Ask anything about your saved bookmarks...",label="Message", lines=2,29 unmodified lines3031323334353663 unmodified lines1001011021031041051061 unmodified line10810911011111211311429 unmodified linesif not message.strip():return history, ""response = ask(_agent, message, thread_id=thread_id or "default")history.append((message, response))return history, ""63 unmodified linesdef build_ui():categories = ["All"] + config.CATEGORIESwith gr.Blocks(title="OpenMark") as app:gr.Markdown("# OpenMark — Your Personal Knowledge Graph")with gr.Tabs():1 unmodified line# Tab 1: Chatwith gr.Tab("Chat"):thread = gr.Textbox(value="default", label="Session ID", scale=1)chatbot = gr.Chatbot(height=500)msg_box = gr.Textbox(placeholder="Ask anything about your saved bookmarks...",label="Message", lines=2,
openmark/ui/app.py+3-4