Spaces:
Sleeping
Sleeping
RobertoBarrosoLuque commited on
Commit ·
8893dd6
1
Parent(s): c358e46
design ready
Browse filesFiles changed (8)
- Makefile+1-2
- README.md+2-2
- assets/kimi-logo.pngAdded
- assets/qwen-logo.pngAdded
- requirements.txt+4-5
- src/__init__.pyAdded
- src/app.pyAdded+874
- src/config.pyAdded+287
20 unmodified lines212223242520 unmodified linesfind . -type d -name .ipynb_checkpoints -exec rm -rf {} +run:@. .venv/bin/activatepython -m src.app20 unmodified lines2122232420 unmodified linesfind . -type d -name .ipynb_checkpoints -exec rm -rf {} +run:.venv/bin/python src/app.py
12345678---title: Fw Vision Studioemoji: ⚡colorFrom: pinkcolorTo: bluesdk: gradiosdk_version: 6.6.0app_file: app.py12345678---title: Fw Vision Studioemoji: ⚡colorFrom: bluecolorTo: purplesdk: gradiosdk_version: 6.6.0app_file: app.py
12345678huggingface_hub==0.34.3fireworks-ai==0.19.18python-dotenv==1.0.0ipythonscikit-learnjupyteraltairmatplotlib1234567huggingface_hub==0.34.3fireworks-ai==0.19.18python-dotenv==1.0.0gradio==6.6.0modelscope_studio==1.3.1PyMuPDFPillow>=10.0.0
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874"""Fireworks Vision Studio - Chat interface for Document Intelligence & Design to Code."""
import base64import osimport tempfileimport timeimport uuid
import fitz # PyMuPDFimport gradio as grfrom gradio_client import utils as client_utilsimport modelscope_studio.components.antd as antdimport modelscope_studio.components.antdx as antdximport modelscope_studio.components.base as msimport modelscope_studio.components.pro as profrom modelscope_studio.components.pro.chatbot import ( ChatbotActionConfig, ChatbotBotConfig, ChatbotMarkdownConfig, ChatbotUserConfig, ChatbotWelcomeConfig,)from modelscope_studio.components.pro.multimodal_input import ( MultimodalInputUploadConfig,)from openai import OpenAIfrom PIL import Image
try: from dotenv import load_dotenv
load_dotenv()except ImportError: pass
# ---------------------------------------------------------------------------# Config# ---------------------------------------------------------------------------
MODELS = { "kimi-k2p5": { "label": "Kimi K2.5", "id": "accounts/fireworks/models/kimi-k2p5", "icon": "./assets/kimi-logo.png", }, "qwen3-vl-30b": { "label": "Qwen3 VL 30B", "id": "accounts/fireworks/models/qwen3-vl-30b-a3b-instruct", "icon": "./assets/qwen-logo.png", },}DEFAULT_MODEL_KEY = "kimi-k2p5"
MAX_IMAGE_DIM = 2048MAX_PDF_PAGES = 10PDF_DPI = 200
DEFAULT_SYS_PROMPT = ( "You are Fireworks Vision Studio, a highly capable multimodal AI assistant. " "You excel at document analysis (legal, medical, financial) and converting " "designs/wireframes into code. Be thorough, accurate, and well-structured. " "Use markdown formatting for clarity. When generating HTML/CSS, return a " "single self-contained file wrapped in a ```html code fence.")
DEFAULT_THEME = { "token": { "colorPrimary": "#6d28d9", }}
def get_client() -> OpenAI: return OpenAI( base_url="https://api.fireworks.ai/inference/v1", api_key=os.environ.get("FIREWORKS_API_KEY", ""), )
# ---------------------------------------------------------------------------# Image / PDF utilities# ---------------------------------------------------------------------------
def encode_file_to_base64(file_path: str) -> str: """Encode a file to a base64 data URI, resizing images if needed.""" mime_type = client_utils.get_mimetype(file_path)
# Resize large images if mime_type and mime_type.startswith("image"): img = Image.open(file_path) if max(img.size) > MAX_IMAGE_DIM: img.thumbnail((MAX_IMAGE_DIM, MAX_IMAGE_DIM), Image.LANCZOS) tmp = tempfile.NamedTemporaryFile(suffix=".png", delete=False) img.save(tmp.name, "PNG") file_path = tmp.name mime_type = "image/png"
with open(file_path, "rb") as f: b64 = base64.b64encode(f.read()).decode("utf-8") return f"data:{mime_type};base64,{b64}"
def pdf_to_images(pdf_path: str) -> list[str]: """Convert PDF pages to temporary PNG files via PyMuPDF.""" doc = fitz.open(pdf_path) paths = [] for i, page in enumerate(doc): if i >= MAX_PDF_PAGES: break mat = fitz.Matrix(PDF_DPI / 72, PDF_DPI / 72) pix = page.get_pixmap(matrix=mat) tmp = tempfile.NamedTemporaryFile(suffix=".png", delete=False) pix.save(tmp.name) paths.append(tmp.name) doc.close() return paths
# ---------------------------------------------------------------------------# Message formatting# ---------------------------------------------------------------------------
def format_history(history): """Convert chatbot history to OpenAI-compatible messages.""" messages = [{"role": "system", "content": DEFAULT_SYS_PROMPT}]
for item in history: if item["role"] == "user": files = [] for file_path in item["content"][0]["content"]: if os.path.exists(file_path): mime_type = client_utils.get_mimetype(file_path)
# Handle PDFs: convert to images if mime_type == "application/pdf": for img_path in pdf_to_images(file_path): data_uri = encode_file_to_base64(img_path) files.append( { "type": "image_url", "image_url": {"url": data_uri}, } ) elif mime_type and mime_type.startswith("image"): data_uri = encode_file_to_base64(file_path) files.append( { "type": "image_url", "image_url": {"url": data_uri}, } ) elif file_path.startswith("http"): files.append( {"type": "image_url", "image_url": {"url": file_path}} )
text = item["content"][1]["content"] messages.append( {"role": "user", "content": files + [{"type": "text", "text": text}]} ) elif item["role"] == "assistant": contents = [ c for c in item["content"] if c.get("type") == "text" ] messages.append( { "role": "assistant", "content": contents[0]["content"] if contents else "", } )
return messages
# ---------------------------------------------------------------------------# UI config helpers# ---------------------------------------------------------------------------
def user_config(disabled_actions=None): return ChatbotUserConfig( class_names=dict(content="user-message-content"), actions=[ "copy", "edit", ChatbotActionConfig( action="delete", popconfirm=dict( title="Delete message", description="Are you sure you want to delete this message?", okButtonProps=dict(danger=True), ), ), ], disabled_actions=disabled_actions, )
def bot_config(disabled_actions=None, model_key=DEFAULT_MODEL_KEY): model = MODELS[model_key] return ChatbotBotConfig( actions=[ "copy", "edit", ChatbotActionConfig( action="retry", popconfirm=dict( title="Regenerate message", description="This will also delete all subsequent messages.", okButtonProps=dict(danger=True), ), ), ChatbotActionConfig( action="delete", popconfirm=dict( title="Delete message", description="Are you sure you want to delete this message?", okButtonProps=dict(danger=True), ), ), ], avatar=model["icon"], disabled_actions=disabled_actions, )
def welcome_config(model_key=DEFAULT_MODEL_KEY): model = MODELS[model_key] return ChatbotWelcomeConfig( variant="borderless", icon=model["icon"], title=f"Hello, I'm {model['label']}", description="Upload images or PDFs and start a conversation. I specialize in document analysis and converting designs to code.", prompts=dict( title="How can I help you today?", styles={ "list": {"width": "100%"}, "item": {"flex": 1}, }, items=[ { "label": "📄 Document Intelligence", "children": [ { "description": "Extract all parties, dates, and key obligations from this contract.", }, { "description": "Summarize this medical report. List diagnoses, medications, and follow-up actions.", }, { "description": "Extract all line items and totals from this invoice into a markdown table.", }, ], }, { "label": "🎨 Design to Code", "children": [ { "description": "Convert this wireframe into a responsive HTML page with a modern look.", }, { "description": "Build this as a landing page with hero section, features grid, and footer using HTML and CSS.", }, { "description": "Create a responsive dashboard layout matching this sketch with HTML, CSS, and inline JS.", }, ], }, ], ), )
def markdown_config(): return ChatbotMarkdownConfig()
def upload_config(): return MultimodalInputUploadConfig( accept="image/*,.pdf", placeholder={ "inline": { "title": "Upload files", "description": "Click or drag files to upload images or PDFs", }, "drop": { "title": "Drop files here", }, }, )
# ---------------------------------------------------------------------------# Event handlers# ---------------------------------------------------------------------------
class Events: @staticmethod def submit(state_value): history = state_value["conversation_contexts"][ state_value["conversation_id"] ]["history"] model_key = state_value.get("model_key", DEFAULT_MODEL_KEY) model_info = MODELS[model_key] messages = format_history(history)
history.append( { "role": "assistant", "content": [], "key": str(uuid.uuid4()), "loading": True, "header": model_info["label"], "status": "pending", } ) yield { chatbot: gr.update(value=history), state: gr.update(value=state_value), }
try: client = get_client() response = client.chat.completions.create( model=model_info["id"], messages=messages, stream=True, max_tokens=4096, )
start_time = time.time() answer_content = "" contents = [None]
for chunk in response: if not chunk or not chunk.choices[0].delta.content: continue
delta = chunk.choices[0].delta if delta.content: if contents[0] is None: contents[0] = {"type": "text", "content": ""} answer_content += delta.content contents[0]["content"] = answer_content
history[-1]["content"] = [c for c in contents if c] history[-1]["loading"] = False yield { chatbot: gr.update(value=history), state: gr.update(value=state_value), }
history[-1]["status"] = "done" cost_time = f"{time.time() - start_time:.2f}" history[-1]["footer"] = f"{cost_time}s" yield { chatbot: gr.update(value=history), state: gr.update(value=state_value), } except Exception as e: history[-1]["loading"] = False history[-1]["status"] = "done" history[-1]["content"] += [ { "type": "text", "content": f'<span style="color: var(--color-red-500)">{e}</span>', } ] yield { chatbot: gr.update(value=history), state: gr.update(value=state_value), } raise
@staticmethod def add_message(input_value, state_value): text = input_value["text"] files = input_value["files"]
if not state_value["conversation_id"]: random_id = str(uuid.uuid4()) state_value["conversation_id"] = random_id state_value["conversation_contexts"][random_id] = {"history": []} state_value["conversations"].append( {"label": text[:50], "key": random_id} )
history = state_value["conversation_contexts"][ state_value["conversation_id"] ]["history"]
history.append( { "key": str(uuid.uuid4()), "role": "user", "content": [ {"type": "file", "content": [f for f in files]}, {"type": "text", "content": text}, ], } )
yield Events.preprocess_submit(clear_input=True)(state_value) try: for chunk in Events.submit(state_value): yield chunk except Exception: raise finally: yield Events.postprocess_submit(state_value)
@staticmethod def preprocess_submit(clear_input=True): def handler(state_value): history = state_value["conversation_contexts"][ state_value["conversation_id"] ]["history"] return { **( {input: gr.update(value=None, loading=True)} if clear_input else {} ), conversations: gr.update( active_key=state_value["conversation_id"], items=list( map( lambda item: { **item, "disabled": item["key"] != state_value["conversation_id"], }, state_value["conversations"], ) ), ), add_conversation_btn: gr.update(disabled=True), clear_btn: gr.update(disabled=True), conversation_delete_menu_item: gr.update(disabled=True), chatbot: gr.update( value=history, bot_config=bot_config( disabled_actions=["edit", "retry", "delete"], model_key=state_value.get("model_key", DEFAULT_MODEL_KEY), ), user_config=user_config( disabled_actions=["edit", "delete"] ), ), state: gr.update(value=state_value), }
return handler
@staticmethod def postprocess_submit(state_value): history = state_value["conversation_contexts"][ state_value["conversation_id"] ]["history"] mk = state_value.get("model_key", DEFAULT_MODEL_KEY) return { input: gr.update(loading=False), conversation_delete_menu_item: gr.update(disabled=False), clear_btn: gr.update(disabled=False), conversations: gr.update(items=state_value["conversations"]), add_conversation_btn: gr.update(disabled=False), chatbot: gr.update( value=history, bot_config=bot_config(model_key=mk), user_config=user_config(), ), state: gr.update(value=state_value), }
@staticmethod def cancel(state_value): history = state_value["conversation_contexts"][ state_value["conversation_id"] ]["history"] history[-1]["loading"] = False history[-1]["status"] = "done" history[-1]["footer"] = "Chat completion paused" return Events.postprocess_submit(state_value)
@staticmethod def delete_message(state_value, e: gr.EventData): index = e._data["payload"][0]["index"] history = state_value["conversation_contexts"][ state_value["conversation_id"] ]["history"] history = history[:index] + history[index + 1 :] state_value["conversation_contexts"][ state_value["conversation_id"] ]["history"] = history return gr.update(value=state_value)
@staticmethod def edit_message(state_value, chatbot_value, e: gr.EventData): index = e._data["payload"][0]["index"] history = state_value["conversation_contexts"][ state_value["conversation_id"] ]["history"] history[index]["content"] = chatbot_value[index]["content"] if not history[index].get("edited"): history[index]["edited"] = True footer = history[index].get("footer", "") or "" history[index]["footer"] = (footer + " " if footer else "") + "Edited" return gr.update(value=state_value), gr.update(value=history)
@staticmethod def regenerate_message(state_value, e: gr.EventData): index = e._data["payload"][0]["index"] history = state_value["conversation_contexts"][ state_value["conversation_id"] ]["history"] history = history[:index] state_value["conversation_contexts"][ state_value["conversation_id"] ]["history"] = history
yield Events.preprocess_submit()(state_value) try: for chunk in Events.submit(state_value): yield chunk except Exception: raise finally: yield Events.postprocess_submit(state_value)
@staticmethod def apply_prompt(e: gr.EventData, input_value): input_value["text"] = e._data["payload"][0]["value"]["description"] urls = e._data["payload"][0]["value"].get("urls", []) input_value["files"] = urls return gr.update(value=input_value)
@staticmethod def new_chat(state_value): if not state_value["conversation_id"]: return gr.skip() state_value["conversation_id"] = "" return ( gr.update(active_key=state_value["conversation_id"]), gr.update(value=None), gr.update(value=state_value), )
@staticmethod def select_conversation(state_value, e: gr.EventData): active_key = e._data["payload"][0] if state_value["conversation_id"] == active_key or ( active_key not in state_value["conversation_contexts"] ): return gr.skip() state_value["conversation_id"] = active_key return ( gr.update(active_key=active_key), gr.update( value=state_value["conversation_contexts"][active_key]["history"] ), gr.update(value=state_value), )
@staticmethod def click_conversation_menu(state_value, e: gr.EventData): conversation_id = e._data["payload"][0]["key"] operation = e._data["payload"][1]["key"] if operation == "delete": del state_value["conversation_contexts"][conversation_id] state_value["conversations"] = [ item for item in state_value["conversations"] if item["key"] != conversation_id ] if state_value["conversation_id"] == conversation_id: state_value["conversation_id"] = "" return ( gr.update( items=state_value["conversations"], active_key=state_value["conversation_id"], ), gr.update(value=None), gr.update(value=state_value), ) return ( gr.update(items=state_value["conversations"]), gr.skip(), gr.update(value=state_value), )
@staticmethod def clear_conversation_history(state_value): if not state_value["conversation_id"]: return gr.skip() state_value["conversation_contexts"][ state_value["conversation_id"] ]["history"] = [] return gr.update(value=None), gr.update(value=state_value)
@staticmethod def change_model(state_value, e: gr.EventData): model_key = e._data["payload"][0] state_value["model_key"] = model_key return ( gr.update( welcome_config=welcome_config(model_key), bot_config=bot_config(model_key=model_key), ), gr.update(value=state_value), )
# ---------------------------------------------------------------------------# CSS# ---------------------------------------------------------------------------
css = """.gradio-container { padding: 0 !important;}.gradio-container > main.fillable { padding: 0 !important;}#chatbot { height: calc(100vh - 21px - 16px - 36px); max-height: 1500px;}#chatbot .chatbot-conversations { height: 100vh; background-color: var(--ms-gr-ant-color-bg-layout); padding-left: 4px; padding-right: 4px;}#chatbot .chatbot-conversations .chatbot-conversations-list { padding-left: 0; padding-right: 0;}#chatbot .chatbot-chat { padding: 32px; padding-bottom: 0; height: 100%;}@media (max-width: 768px) { #chatbot .chatbot-chat { padding: 10px; }}#chatbot .chatbot-chat .chatbot-chat-messages { flex: 1;}.powered-by-bar { display: flex; align-items: center; justify-content: space-between; padding: 6px 16px; border-bottom: 1px solid var(--ms-gr-ant-color-border-secondary, #f0f0f0);}.powered-by-bar .bar-title { font-size: 24px; font-weight: 600; color: #333;}}.powered-by-bar .bar-right { display: flex; align-items: center; gap: 6px;}.powered-by-bar .bar-right span { font-size: 11px; color: #999; text-transform: uppercase; letter-spacing: 0.04em;}.powered-by-bar img { height: 18px; opacity: 0.85;}"""
# ---------------------------------------------------------------------------# Gradio UI# ---------------------------------------------------------------------------
with gr.Blocks(css=css, fill_width=True) as demo: state = gr.State( { "conversation_contexts": {}, "conversations": [], "conversation_id": "", "model_key": DEFAULT_MODEL_KEY, } )
with ms.Application(), antdx.XProvider(theme=DEFAULT_THEME), ms.AutoLoading(): # Top bar: title left, powered-by right with ms.Div(elem_classes="powered-by-bar"): ms.Span("Welcome to FW Vision Studio", elem_classes="bar-title") with ms.Div(elem_classes="bar-right"): ms.Span("Powered by") antd.Image( "./assets/fireworks_logo.png", preview=False, alt="Fireworks AI", height=30, )
with antd.Row(gutter=[20, 20], wrap=False, elem_id="chatbot"): # --- Left sidebar --- with antd.Col( md=dict(flex="0 0 260px", span=24, order=0), span=0, order=1, elem_style=dict(width=0), ): with ms.Div(elem_classes="chatbot-conversations"): with antd.Flex( vertical=True, gap="small", elem_style=dict(height="100%") ): # Model selector model_select = antd.Select( value=DEFAULT_MODEL_KEY, options=[ {"label": m["label"], "value": k} for k, m in MODELS.items() ], elem_style=dict(width="100%"), )
# New conversation button with antd.Button( value=None, color="primary", variant="filled", block=True ) as add_conversation_btn: ms.Text("New Conversation") with ms.Slot("icon"): antd.Icon("PlusOutlined")
# Conversations list with antdx.Conversations( elem_classes="chatbot-conversations-list", ) as conversations: with ms.Slot("menu.items"): with antd.Menu.Item( label="Delete", key="delete", danger=True ) as conversation_delete_menu_item: with ms.Slot("icon"): antd.Icon("DeleteOutlined")
# --- Right: chat area --- with antd.Col(flex=1, elem_style=dict(height="100%")): with antd.Flex( vertical=True, gap="small", elem_classes="chatbot-chat" ): chatbot = pro.Chatbot( elem_classes="chatbot-chat-messages", height=0, markdown_config=markdown_config(), welcome_config=welcome_config(), user_config=user_config(), bot_config=bot_config(), )
with pro.MultimodalInput( placeholder="Ask me to analyze a document or convert a design to code...", upload_config=upload_config(), ) as input: with ms.Slot("prefix"): with antd.Flex( gap=4, wrap=True, elem_style=dict( maxWidth="40vw", display="inline-flex" ), ): with antd.Button(value=None, type="text") as clear_btn: with ms.Slot("icon"): antd.Icon("ClearOutlined")
# --- Event wiring ---
# Model selector model_select.change( fn=Events.change_model, inputs=[state], outputs=[chatbot, state], )
# Conversations add_conversation_btn.click( fn=Events.new_chat, inputs=[state], outputs=[conversations, chatbot, state], ) conversations.active_change( fn=Events.select_conversation, inputs=[state], outputs=[conversations, chatbot, state], ) conversations.menu_click( fn=Events.click_conversation_menu, inputs=[state], outputs=[conversations, chatbot, state], )
# Chatbot chatbot.welcome_prompt_select( fn=Events.apply_prompt, inputs=[input], outputs=[input] ) chatbot.delete(fn=Events.delete_message, inputs=[state], outputs=[state]) chatbot.edit( fn=Events.edit_message, inputs=[state, chatbot], outputs=[state, chatbot], ) regenerating_event = chatbot.retry( fn=Events.regenerate_message, inputs=[state], outputs=[ input, clear_btn, conversation_delete_menu_item, add_conversation_btn, conversations, chatbot, state, ], )
# Input submit_event = input.submit( fn=Events.add_message, inputs=[input, state], outputs=[ input, clear_btn, conversation_delete_menu_item, add_conversation_btn, conversations, chatbot, state, ], ) input.cancel( fn=Events.cancel, inputs=[state], outputs=[ input, conversation_delete_menu_item, clear_btn, conversations, add_conversation_btn, chatbot, state, ], cancels=[submit_event, regenerating_event], queue=False, ) clear_btn.click( fn=Events.clear_conversation_history, inputs=[state], outputs=[chatbot, state], )
if __name__ == "__main__": demo.queue(default_concurrency_limit=100).launch( server_name="0.0.0.0", server_port=7860, ssr_mode=False, max_threads=100, )123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287import gradio as gr
# Custom CSS with Fireworks AI purple paletteCUSTOM_CSS = """ /* Professional container with subtle purple gradient */ .gradio-container { font-family: 'Inter', 'Segoe UI', system-ui, sans-serif; background: linear-gradient(135deg, #FAFBFC 0%, #F3F0FF 100%); }
/* Clean chat messages */ .chat-message { border-radius: 12px; padding: 16px; margin: 8px 0; background: white; box-shadow: 0 1px 3px rgba(103, 32, 255, 0.08); border: 1px solid #E6EAF4; transition: all 0.2s ease; }
.chat-message:hover { box-shadow: 0 4px 12px rgba(103, 32, 255, 0.12); }
/* Professional function calls with purple accent */ .function-call { background: linear-gradient(to right, #F3F0FF, #FFFFFF); border-left: 3px solid #6720FF; padding: 16px; margin: 12px 0; border-radius: 8px; box-shadow: 0 1px 2px rgba(103, 32, 255, 0.06); font-family: 'JetBrains Mono', monospace; font-size: 0.9em; color: #0F172A; }
/* Sleek meetings panel */ .meetings-container { background: white; border-radius: 16px; padding: 24px; box-shadow: 0 4px 6px rgba(103, 32, 255, 0.08); border: 1px solid #E6EAF4; }
/* Modern accordion with purple accents */ .meeting-details { border: 1px solid #E6EAF4; border-radius: 10px; background: #FFFFFF; margin: 10px 0; transition: all 0.25s ease; overflow: hidden; }
.meeting-details:hover { box-shadow: 0 4px 12px rgba(103, 32, 255, 0.1); border-color: #C4B5FD; }
.meeting-details[open] { border-color: #6720FF; box-shadow: 0 4px 12px rgba(103, 32, 255, 0.15); }
/* Clean summary styling with purple */ .meeting-summary { font-weight: 600; color: #0F172A; padding: 14px 18px; cursor: pointer; background: linear-gradient(90deg, transparent 0%, #F3F0FF 100%); transition: background 0.2s ease; }
.meeting-summary:hover { background: linear-gradient(90deg, #F3F0FF 0%, #EDE9FE 100%); }
/* Meeting content styling */ .meeting-content { padding: 16px 18px; color: #64748B; border-top: 1px solid #E6EAF4; background: #FAFBFC; }
/* Professional content cards */ .content-card { background: white; border-radius: 16px; padding: 28px; box-shadow: 0 4px 6px rgba(103, 32, 255, 0.06); border: 1px solid #E6EAF4; }
/* Purple accent links */ a { color: #6720FF; text-decoration: none; transition: color 0.2s ease; }
a:hover { color: #7B2FFF; text-decoration: underline; }
/* Custom scrollbar with purple */ ::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #F3F0FF; border-radius: 4px; }
::-webkit-scrollbar-thumb { background: #C4B5FD; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #A78BFA; }
/* Search box styling */ .search-box { border: 2px solid #E6EAF4; border-radius: 10px; transition: all 0.2s ease; }
.search-box:focus { border-color: #6720FF; box-shadow: 0 0 0 3px rgba(103, 32, 255, 0.1); }
/* Header styling */ .header-title { background: linear-gradient(135deg, #6720FF 0%, #8B5CF6 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; font-weight: 700; }
/* Chat window styling - readable font size */ .chat-window { font-size: 0.95em !important; }
.chat-window .message { font-size: 0.95em !important; }
.chat-window .message-content { font-size: 0.95em !important; line-height: 1.6; }
/* Readable text in chat messages */ .chat-window p { font-size: 0.95em !important; }
.chat-window code { font-size: 0.9em !important; }
.chat-window pre { font-size: 0.9em !important; }
/* Slightly smaller tool calling cards */ .chat-window .tool-call { font-size: 0.92em !important; }
.chat-window table { font-size: 0.92em !important; }
.chat-window th, .chat-window td { font-size: 0.92em !important; padding: 6px 10px !important; }
/* Proportional headings in chat */ .chat-window h1 { font-size: 1.5em !important; }
.chat-window h2 { font-size: 1.3em !important; }
.chat-window h3 { font-size: 1.15em !important; }
.chat-window h4, .chat-window h5, .chat-window h6 { font-size: 1em !important; }
/* List items */ .chat-window ul, .chat-window ol { font-size: 0.95em !important; }
.chat-window li { font-size: 0.95em !important; }
/* Compact header spacing */ .compact-header { margin-bottom: 8px !important; padding: 8px 0 !important; }
.compact-input { margin-bottom: 4px !important; }
.compact-input label { font-size: 0.9em !important; margin-bottom: 4px !important; }
/* Compact example questions */ .compact-examples { margin: 8px 0 12px 0 !important; gap: 6px !important; }
.compact-examples button { font-size: 0.85em !important; padding: 6px 10px !important; min-height: 32px !important; }"""
# Create custom Fireworks AI-inspired themeGRADIO_THEME = gr.themes.Base( primary_hue=gr.themes.colors.purple, secondary_hue=gr.themes.colors.violet, neutral_hue=gr.themes.colors.slate, spacing_size=gr.themes.sizes.spacing_lg, radius_size=gr.themes.sizes.radius_md, text_size=gr.themes.sizes.text_md, font=[gr.themes.GoogleFont('Inter'), 'ui-sans-serif', 'system-ui', 'sans-serif'], font_mono=[gr.themes.GoogleFont('JetBrains Mono'), 'monospace']).set( # Primary button styling (Fireworks AI purple) button_primary_background_fill='#6720FF', button_primary_background_fill_hover='#7B2FFF', button_primary_text_color='#FFFFFF',
# Secondary button styling button_secondary_background_fill='#F3F0FF', button_secondary_background_fill_hover='#EDE9FE', button_secondary_text_color='#6720FF',
# Interactive elements slider_color='#6720FF',
# Links link_text_color='#6720FF', link_text_color_hover='#7B2FFF', link_text_color_visited='#8B5CF6',
# Backgrounds body_background_fill='#FAFBFC', block_background_fill='#FFFFFF', input_background_fill='#FFFFFF',
# Borders border_color_primary='#E6EAF4',)Makefile+1-2
README.md+2-2
assets/kimi-logo.pngAdded

Large File Pointer Details
- SHA256: be06357bae23718e1f35b358d96faf3c57b3c24edcde30cc61aef4a892b1ea3b
- Pointer size: 129 Bytes
- Size of remote file: 1.94 kB
assets/qwen-logo.pngAdded

Large File Pointer Details
- SHA256: 683ed1e1227b7558e5bdd28b5b21d9c9912f096a4d0380ea854c4a7763087f41
- Pointer size: 131 Bytes
- Size of remote file: 195 kB
requirements.txt+4-5
src/__init__.pyAdded
src/app.pyAdded+874
src/config.pyAdded+287