import gradio as gr from huggingface_hub import InferenceClient client = InferenceClient("lambdaindie/lambda") css = r""" /* Fonte e cores gerais */ * { font-family: 'JetBrains Mono', monospace; } .gradio-container { background-color: #0d0d0d; color: #e0e0e0; } /* Inputs e chat bubbles */ textarea, input, .block, .wrap, .chatbot, .scroll-hide { background-color: #1a1a1a !important; color: #e0e0e0 !important; border: 1px solid #333 !important; border-radius: 12px; } /* Botão com pulse animation */ @keyframes pulse { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,255,255,0.5); } 70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(255,255,255,0); } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,255,255,0); } } button.pulse { background-color: #272727 !important; border: 1px solid #444 !important; color: #e0e0e0 !important; border-radius: 12px; animation: pulse 2s infinite; } /* Hover no botão */ button.pulse:hover { background-color: #444 !important; } /* Spinner de thinking */ @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } .loader { border: 3px solid #2b2b2b; border-top: 3px solid #e0e0e0; border-radius: 50%; width: 18px; height: 18px; animation: spin 1s linear infinite; display: inline-block; margin-right: 8px; vertical-align: middle; } /* Markdown de thinking dentro do chat */ .thinking-html { background-color: #2b2b2b; padding: 10px; border-radius: 8px; margin-bottom: 8px; font-style: italic; color: #aaaaaa; display: flex; align-items: center; } """ with gr.Blocks(css=css, theme=gr.themes.Base()) as demo: gr.Markdown("