Quivering commited on
Commit
28d8145
·
1 Parent(s): 8237908

Add welcome message to agent

Browse files
Files changed (1) hide show
  1. Gradio_UI.py +26 -1
Gradio_UI.py CHANGED
@@ -188,6 +188,30 @@ class GradioUI:
188
  if self.file_upload_folder is not None:
189
  if not os.path.exists(file_upload_folder):
190
  os.mkdir(file_upload_folder)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
191
 
192
  def interact_with_agent(self, prompt, messages):
193
  import gradio as gr
@@ -262,10 +286,11 @@ class GradioUI:
262
  import gradio as gr
263
 
264
  with gr.Blocks(fill_height=True) as demo:
265
- stored_messages = gr.State([])
266
  file_uploads_log = gr.State([])
267
  chatbot = gr.Chatbot(
268
  label="Agent",
 
269
  type="messages",
270
  avatar_images=(
271
  None,
 
188
  if self.file_upload_folder is not None:
189
  if not os.path.exists(file_upload_folder):
190
  os.mkdir(file_upload_folder)
191
+
192
+ # Add welcome message
193
+ self.welcome_message = """👋 Welcome to the Multi-tool Assistant!
194
+
195
+ I'm here to help you with various tasks:
196
+
197
+ 🔍 Search: I can search the web for information
198
+ 🎨 Image Generation: I can create images from text descriptions
199
+ 🌍 Weather: I can check weather conditions in any city
200
+ 🕒 Time Zones: I can tell you the current time anywhere in the world
201
+ 💰 Cryptocurrency: I can:
202
+ • Show top 10 cryptocurrencies
203
+ • Get specific crypto prices
204
+ • Provide detailed crypto information
205
+ • Generate 24-hour market summaries
206
+
207
+ Try these example commands:
208
+ • "Generate an image of a sunset over mountains"
209
+ • "What's the weather like in Tokyo?"
210
+ • "Show me the crypto market summary"
211
+ • "What time is it in New York?"
212
+ • "Search for recent AI developments"
213
+
214
+ How can I assist you today?"""
215
 
216
  def interact_with_agent(self, prompt, messages):
217
  import gradio as gr
 
286
  import gradio as gr
287
 
288
  with gr.Blocks(fill_height=True) as demo:
289
+ stored_messages = gr.State([gr.ChatMessage(role="assistant", content=self.welcome_message)])
290
  file_uploads_log = gr.State([])
291
  chatbot = gr.Chatbot(
292
  label="Agent",
293
+ value=[[None, self.welcome_message]], # Set initial message
294
  type="messages",
295
  avatar_images=(
296
  None,