Spaces:
Sleeping
Sleeping
Update app.py
Browse files3 unmodified lines4567891030 unmodified lines414243444546474849501 unmodified line5253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111126 unmodified lines1191201211221231243 unmodified linesclient = InferenceClient(model="YoussefElsafi/PlayerAI-1.2B-v1.5",token=os.environ.get("Spaces"),)SYSTEM_PROMPT = (30 unmodified lines* {font-family: 'Press Start 2P', monospace !important;border-radius: 0px !important;}body, .gradio-container {background-color: #000000 !important;color: #ffffff !important;}1 unmodified line.gradio-container {max-width: 800px !important;margin: 0 auto !important;}.message.user, div[data-testid="user"] {background-color: #00d000 !important;color: #000000 !important;font-size: 11px !important;line-height: 1.8 !important;padding: 12px !important;text-transform: none !important;}.message.bot, div[data-testid="bot"] {background-color: transparent !important;color: #ffffff !important;font-size: 11px !important;line-height: 1.8 !important;padding: 12px !important;text-transform: none !important;}textarea, input[type="text"] {background-color: #111111 !important;color: #00ff00 !important;border: 2px solid #00d000 !important;font-size: 11px !important;padding: 12px !important;text-transform: none !important;}button {background-color: #00d000 !important;color: #000000 !important;border: 2px solid #00d000 !important;font-size: 10px !important;text-transform: none !important;}h1, h2, h3 {color: #00ff00 !important;text-align: center;font-size: 18px !important;text-transform: none !important;}footer { display: none !important; }.avatar-container, .avatar-container img {width: 40px !important;height: 40px !important;background: transparent !important;image-rendering: pixelated !important;}"""# Local pixel-art avatars (place face.png and question.png in your Space root)USER_AVATAR = "face.png"BOT_AVATAR = "question.png"6 unmodified linesheight=500,show_label=False,bubble_full_width=False,)gr.ChatInterface(3 unmodified lines4567891030 unmodified lines41424344454647484950511 unmodified line53545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501516 unmodified lines1581591601611621631643 unmodified linesclient = InferenceClient(model="YoussefElsafi/PlayerAI-1.2B-v1.5",token=os.environ.get("HF_TOKEN"),)SYSTEM_PROMPT = (30 unmodified lines* {font-family: 'Press Start 2P', monospace !important;border-radius: 0 !important;text-transform: none !important;}html, body, .gradio-container, .main, .wrap, .contain, gradio-app {background-color: #000000 !important;color: #ffffff !important;}1 unmodified line.gradio-container {max-width: 800px !important;margin: 0 auto !important;padding: 10px !important;}/* Remove any background from chatbot wrapper */.chatbot, .chatbot-container, [data-testid="chatbot"],.message-wrap, .messages, .panel {background-color: #000000 !important;border: none !important;box-shadow: none !important;}/* USER bubble - green */.message.user .message-bubble-border,div[data-testid="user"] .message-bubble-border,.user .prose,.message.user {background-color: #00d000 !important;color: #000000 !important;border: none !important;font-size: 12px !important;line-height: 1.6 !important;padding: 10px 14px !important;}/* BOT bubble - white */.message.bot .message-bubble-border,div[data-testid="bot"] .message-bubble-border,.bot .prose,.message.bot {background-color: #ffffff !important;color: #000000 !important;border: none !important;font-size: 12px !important;line-height: 1.6 !important;padding: 10px 14px !important;}/* Make text inside bubbles black */.message.user *, .message.bot * {color: #000000 !important;background-color: transparent !important;}/* Pixelated avatars - small and square */.avatar-container, .avatar-container img,img.avatar-image {width: 36px !important;height: 36px !important;min-width: 36px !important;background: transparent !important;image-rendering: pixelated !important;image-rendering: -moz-crisp-edges !important;border: none !important;border-radius: 0 !important;}/* Input area */textarea, input[type="text"] {background-color: #111111 !important;color: #00ff00 !important;border: 2px solid #00d000 !important;font-size: 12px !important;padding: 12px !important;}/* Buttons */button {background-color: #00d000 !important;color: #000000 !important;border: 2px solid #00d000 !important;font-size: 10px !important;}button:hover {background-color: #00ff00 !important;}/* Title */h1, h2, h3 {color: #00ff00 !important;text-align: center;font-size: 16px !important;}footer { display: none !important; }/* Hide gradio default styling */.block, .form, .gap {background-color: #000000 !important;border: none !important;}"""USER_AVATAR = "face.png"BOT_AVATAR = "question.png"6 unmodified linesheight=500,show_label=False,bubble_full_width=False,show_copy_button=False,)gr.ChatInterface(
app.py+65-25