Spaces:
Sleeping
Sleeping
Hide chat input scrollbar
Browse files106 unmodified lines1071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411101421431441455 unmodified lines151152153122123124125126127128129130154155156157158159160161162163164165166167168169170171172173174175176177178179106 unmodified lines return pipeline.get_answer(message.strip(), chat_history=chat_history)
# Hide the tiny vertical scrollbar/stepper that Gradio shows in the chat composerCHAT_CSS = """/* Chat input composer */.contain textarea,footer textarea,.input-container textarea,textarea[data-testid="textbox"] { overflow-y: hidden !important; resize: none !important; scrollbar-width: none !important; /* Firefox */ -ms-overflow-style: none !important; /* Legacy Edge */}.contain textarea::-webkit-scrollbar,footer textarea::-webkit-scrollbar,.input-container textarea::-webkit-scrollbar,textarea[data-testid="textbox"]::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important;}/* Number-input style spinners some browsers inject */input[type="number"]::-webkit-outer-spin-button,input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none !important; margin: 0 !important;}input[type="number"] { -moz-appearance: textfield !important;}"""
def build_demo() -> gr.ChatInterface:def build_demo() -> gr.Blocks: config = get_config() profile_name = config.get("profile.name", "the candidate") profile_title = config.get("profile.title", "Professional")5 unmodified lines ) examples = [config.format_template(q) for q in config.get("ui.example_questions", [])]
return gr.ChatInterface( fn=answer, type="messages", title="ProfillyBot", description=( f"**{profile_name}** — {profile_title}\n\n{greeting}\n\n" "_Qwen2.5-3B-Instruct on Hugging Face ZeroGPU + hybrid RAG._" ), examples=examples or None, chat_input = gr.Textbox( placeholder="Type a message...", lines=1, max_lines=1, show_label=False, container=False, autofocus=True, )
with gr.Blocks(css=CHAT_CSS, title="ProfillyBot") as demo: gr.ChatInterface( fn=answer, type="messages", title="ProfillyBot", description=( f"**{profile_name}** — {profile_title}\n\n{greeting}\n\n" "_Qwen2.5-3B-Instruct on Hugging Face ZeroGPU + hybrid RAG._" ), examples=examples or None, textbox=chat_input, ) return demo
demo = build_demo()
gradio_app.py+54-10