Spaces:
Sleeping
Sleeping
Upload openmark/ui/app.py with huggingface_hub
Browse files29 unmodified lines30313233343334353663 unmodified lines1001011021041031041051061 unmodified line10810911011211111211311429 unmodified lines if 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})
history.append((message, response))
return history, ""
63 unmodified linesdef build_ui():
categories = ["All"] + config.CATEGORIES
with gr.Blocks(title="OpenMark", theme=gr.themes.Soft()) as app:
with gr.Blocks(title="OpenMark") as app:
gr.Markdown("# OpenMark — Your Personal Knowledge Graph")
with gr.Tabs():1 unmodified line # Tab 1: Chat
with gr.Tab("Chat"):
thread = gr.Textbox(value="default", label="Session ID", scale=1)
chatbot = gr.Chatbot(type="messages", height=500)
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