Adds a placeholder to the gradio chatbot

#2
by ysharma HF staff - opened
Files changed (2) hide show
  1. README.md +1 -1
  2. app.py +10 -1
README.md CHANGED
@@ -4,7 +4,7 @@ emoji: ⚓️
4
  colorFrom: indigo
5
  colorTo: purple
6
  sdk: gradio
7
- sdk_version: 4.19.2
8
  app_file: app.py
9
  pinned: false
10
  license: apache-2.0
 
4
  colorFrom: indigo
5
  colorTo: purple
6
  sdk: gradio
7
+ sdk_version: 4.25.0
8
  app_file: app.py
9
  pinned: false
10
  license: apache-2.0
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.