ysharma HF staff commited on
Commit
4b4cab8
1 Parent(s): f0371e7

Adds a placeholder to the gradio chatbot

Browse files

![image.png](https://cdn-uploads.huggingface.co/production/uploads/60d2dc1007da9c17c72708f8/kAioyPkAMI9lrpNfJoAE9.png)

Files changed (1) hide show
  1. app.py +10 -1
app.py CHANGED
@@ -85,9 +85,18 @@ prompt_examples = [
85
  'Cách nướng cá'
86
  ]
87
 
 
 
 
 
 
 
 
 
 
88
  with gr.Blocks(theme=gr.themes.Soft(), fill_height=True) as demo:
89
  # gr.Markdown("""<center><font size=8>Sailor-Chat Bot⚓</center>""")
90
  gr.Markdown("""<p align="center"><img src="https://github.com/sail-sg/sailor-llm/raw/main/misc/wide_sailor_banner.jpg" style="height: 110px"/><p>""")
91
- gr.ChatInterface(predict, fill_height=True, examples=prompt_examples, css=css)
92
 
93
  demo.launch() # Launching the web interface.
 
85
  'Cách nướng cá'
86
  ]
87
 
88
+ placeholder = """
89
+ <div style="opacity: 0.5;">
90
+ <img src="https://raw.githubusercontent.com/sail-sg/sailor-llm/main/misc/banner.jpg" style="width:30%;">
91
+ <br>Sailor models are designed to understand and generate text across diverse linguistic landscapes of these SEA regions:
92
+ <br>🇮🇩Indonesian, 🇹🇭Thai, 🇻🇳Vietnamese, 🇲🇾Malay, and 🇱🇦Lao.
93
+ </div>
94
+ """
95
+
96
+ chatbot = gr.Chatbot(label='Sailor', placeholder=placeholder)
97
  with gr.Blocks(theme=gr.themes.Soft(), fill_height=True) as demo:
98
  # gr.Markdown("""<center><font size=8>Sailor-Chat Bot⚓</center>""")
99
  gr.Markdown("""<p align="center"><img src="https://github.com/sail-sg/sailor-llm/raw/main/misc/wide_sailor_banner.jpg" style="height: 110px"/><p>""")
100
+ gr.ChatInterface(predict, chatbot=chatbot, fill_height=True, examples=prompt_examples, css=css)
101
 
102
  demo.launch() # Launching the web interface.