Spaces:
Paused
Paused
NGUYEN, Xuan Phi commited on
Commit ยท
c8aed7a
1
Parent(s): 93038e2
update
Browse filesFiles changed (4)
51 unmodified lines52535455565755 unmodified lines11311411511611711851 unmodified linesBACKEND,DEMOS,DELETE_FOLDER,)55 unmodified linestab_names=demos_names,title=f"{MODEL_TITLE}",description=descriptions,)demo.title = MODEL_NAME51 unmodified lines5253545556575855 unmodified lines11411511611711811912051 unmodified linesBACKEND,DEMOS,DELETE_FOLDER,CSS,)55 unmodified linestab_names=demos_names,title=f"{MODEL_TITLE}",description=descriptions,css=CSS,)demo.title = MODEL_NAME
35 unmodified lines3637383940414243444546474849505152535455565728 unmodified lines868788899091929335 unmodified lines</span>""".strip()# Explore <a href="https://huggingface.co/spaces/SeaLLMs/SeaLLM-7B" target="_blank">SeaLMMM-7B</a> - our multi-modal version of SeaLLMs.MODEL_DESC = f"""<div style='display:flex; gap: 0.25rem; '><a href='https://damo-nlp-sg.github.io/SeaLLMs/'><img src='https://img.shields.io/badge/Blog-red'></a><a href='https://github.com/damo-nlp-sg/seallms'><img src='https://img.shields.io/badge/Github-Code-success'></a><a href='https://huggingface.co/spaces/SeaLLMs/SeaLLM-7B-v2.5'><img src='https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue'></a><a href='https://huggingface.co/SeaLLMs/SeaLLM-7B-v2.5'><img src='https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Model-blue'></a><a href='https://arxiv.org/pdf/2312.00738.pdf'><img src='https://img.shields.io/badge/Paper-red'></a></div><span style="font-size: larger"><a href="https://huggingface.co/SeaLLMs/SeaLLM-7B-v2.5" target="_blank">SeaLLM-7B-v2.5</a> - a assistant for Southeast Asian Languages ๐ฌ๐ง ๐ป๐ณ ๐ฎ๐ฉ ๐น๐ญ ๐ฒ๐พ ๐ฐ๐ญ ๐ฑ๐ฆ ๐ต๐ญ ๐ฒ๐ฒ.</span><br><span><span style="color: red">The chatbot may produce false and harmful content!</span>By using our service, you are required to agree to our <a href="https://huggingface.co/SeaLLMs/SeaLLM-Chat-13b/blob/main/LICENSE" target="_blank" style="color: red">Terms Of Use</a></span>""".strip()# <span>28 unmodified linesyear = 2023,}```"""USE_PANEL = bool(int(os.environ.get("USE_PANEL", "1")))CHATBOT_HEIGHT = int(os.environ.get("CHATBOT_HEIGHT", "500"))35 unmodified lines36373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828328 unmodified lines11211311411511611711811912012112212312412512612712812913013113213313413513613713813914035 unmodified lines</span>""".strip()MODEL_TITLE = """<img src="file/seal_logo.png" style="max-width: 10em;max-height: 5%;height: 3em;width: 3em;"><div class="text" style="float: left;padding-left: 2%;font-size: larger;margin-bottom: -1em;margin-top: -1em;">SeaLLMs - Large Language Models for Southeast Asia<div style='display:flex; gap: 0.25rem; '><a href='https://damo-nlp-sg.github.io/SeaLLMs/'><img class="tag" src='https://img.shields.io/badge/Blog-red'></a><a href='https://github.com/damo-nlp-sg/seallms'><img class="tag" src='https://img.shields.io/badge/Code-success'></a><a href='https://huggingface.co/spaces/SeaLLMs/SeaLLM-7B-v2.5'><img class="tag" src='https://img.shields.io/badge/%F0%9F%A4%97-Spaces-blue'></a><a href='https://huggingface.co/SeaLLMs/SeaLLM-7B-v2.5'><img class="tag" src='https://img.shields.io/badge/%F0%9F%A4%97-Model-blue'></a><a href='https://arxiv.org/pdf/2312.00738.pdf'><img class="tag" src='https://img.shields.io/badge/Paper-red'></a></div></div>"""# Explore <a href="https://huggingface.co/spaces/SeaLLMs/SeaLLM-7B" target="_blank">SeaLMMM-7B</a> - our multi-modal version of SeaLLMs.# <div style='display:flex; gap: 0.25rem; '># <a href='https://damo-nlp-sg.github.io/SeaLLMs/'><img class="tag" src='https://img.shields.io/badge/Blog-red'></a># <a href='https://github.com/damo-nlp-sg/seallms'><img class="tag" src='https://img.shields.io/badge/Code-success'></a># <a href='https://huggingface.co/spaces/SeaLLMs/SeaLLM-7B-v2.5'><img class="tag" src='https://img.shields.io/badge/%F0%9F%A4%97-Spaces-blue'></a># <a href='https://huggingface.co/SeaLLMs/SeaLLM-7B-v2.5'><img class="tag" src='https://img.shields.io/badge/%F0%9F%A4%97-Model-blue'></a># <a href='https://arxiv.org/pdf/2312.00738.pdf'><img class="tag" src='https://img.shields.io/badge/Paper-red'></a># </div>MODEL_DESC = f"""<span style="font-size: larger"><a href="https://huggingface.co/SeaLLMs/SeaLLM-7B-v2.5" target="_blank">SeaLLM-7B-v2.5</a> - a helpful assistant for Southeast Asian Languages ๐ฌ๐ง ๐ป๐ณ ๐ฎ๐ฉ ๐น๐ญ ๐ฒ๐พ ๐ฐ๐ญ ๐ฑ๐ฆ ๐ต๐ญ ๐ฒ๐ฒ.</span><br><span><span style="color: red">The chatbot may produce false and harmful content!</span>By using our service, you agree to our <a href="https://huggingface.co/SeaLLMs/SeaLLM-Chat-13b/blob/main/LICENSE" target="_blank" style="color: red">Terms Of Use</a></span>""".strip()# <span>28 unmodified linesyear = 2023,}```"""CSS = """.message-wrap.svelte-1lcyrx4>div.svelte-1lcyrx4 img {min-width: 200px;min-height: 150px;max-height: 600px;max-width; 90%;width: auto;object-fit: contain;}.panel-full-width.svelte-1lcyrx4.svelte-1lcyrx4.svelte-1lcyrx4 {padding: calc(var(--spacing-xxl) * 1);width: 100%}img.tag {max-height: 1.5em;width: auto;}"""USE_PANEL = bool(int(os.environ.get("USE_PANEL", "1")))CHATBOT_HEIGHT = int(os.environ.get("CHATBOT_HEIGHT", "500"))
93 unmodified lines94959697989910093 unmodified lineswith self:if title:gr.Markdown(f"<h1 style='text-align: center; margin-bottom: 1rem'>{title}</h1>")if description:gr.Markdown(description)93 unmodified lines94959697989910010193 unmodified lineswith self:if title:gr.Markdown(# f"<h1 style='text-align: center; margin-bottom: 1rem'>{title}</h1>"f"<h1 style='text-align: center;'>{title}</h1>")if description:gr.Markdown(description)
75 unmodified lines76777879808116 unmodified lines9899100101102103104105106107108109110111112113114115116708 unmodified lines82582682782882983083175 unmodified linesIMAGE_TOKEN,IMAGE_TOKEN_INTERACTIVE,CHATBOT_HEIGHT,)from .multimodal_chat_interface import (16 unmodified linesEXAMPLES_PER_PAGE = int(os.environ.get("EXAMPLES_PER_PAGE", 10))CSS = """.message.svelte-1lcyrx4.svelte-1lcyrx4.svelte-1lcyrx4 {padding-top: 1em;}"""CSS = """.panel-full-width.svelte-1lcyrx4.svelte-1lcyrx4.svelte-1lcyrx4 {padding: calc(var(--spacing-xxl) * 1);width: 100%}"""DOC_TEMPLATE = """###{content}###708 unmodified linesmax_tokens = kwargs.get("max_tokens", MAX_TOKENS)temperature = kwargs.get("temperature", TEMPERATURE)model_name = kwargs.get("model_name", MODEL_NAME)description = description or """Upload an image to ask question about it."""assert MultimodalTextbox is not None75 unmodified lines7677787980818216 unmodified lines99100101102103104708 unmodified lines81381481581681781881975 unmodified linesIMAGE_TOKEN,IMAGE_TOKEN_INTERACTIVE,CHATBOT_HEIGHT,CSS,)from .multimodal_chat_interface import (16 unmodified linesEXAMPLES_PER_PAGE = int(os.environ.get("EXAMPLES_PER_PAGE", 10))DOC_TEMPLATE = """###{content}###708 unmodified linesmax_tokens = kwargs.get("max_tokens", MAX_TOKENS)temperature = kwargs.get("temperature", TEMPERATURE)model_name = kwargs.get("model_name", MODEL_NAME)# description = descriptionassert MultimodalTextbox is not None
app.py+2
multipurpose_chatbot/configs.py+56-9
multipurpose_chatbot/demos/base_demo.py+2-1
multipurpose_chatbot/demos/mm_chat_interface.py+2-14