Quivering commited on
Commit
3d594d7
·
1 Parent(s): 8237908

Temporary commit before merging welcome_message

Browse files
Files changed (1) hide show
  1. Gradio_UI.py +15 -1
Gradio_UI.py CHANGED
@@ -261,8 +261,21 @@ class GradioUI:
261
  def launch(self, **kwargs):
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",
@@ -273,6 +286,7 @@ class GradioUI:
273
  ),
274
  resizeable=True,
275
  scale=1,
 
276
  )
277
  # If an upload folder is provided, enable the upload feature
278
  if self.file_upload_folder is not None:
 
261
  def launch(self, **kwargs):
262
  import gradio as gr
263
 
264
+ # Create welcome message based on agent's capabilities
265
+ welcome_message = (
266
+ "👋 Hello! I'm your AI assistant. Here's what I can help you with:\n\n"
267
+ "🔍 Web Search: I can search the internet for information\n"
268
+ "🖼️ Image Generation: I can create images from text descriptions\n"
269
+ "🕒 Time Zones: I can tell you the current time in any timezone\n"
270
+ "☁️ Weather Information: I can check the weather for any city\n"
271
+ "💰 Cryptocurrency: I can track crypto prices and market information\n\n"
272
+ "Feel free to ask me anything about these topics!"
273
+ )
274
+
275
  with gr.Blocks(fill_height=True) as demo:
276
+ stored_messages = gr.State([
277
+ gr.ChatMessage(role="assistant", content=welcome_message)
278
+ ])
279
  file_uploads_log = gr.State([])
280
  chatbot = gr.Chatbot(
281
  label="Agent",
 
286
  ),
287
  resizeable=True,
288
  scale=1,
289
+ value=[[None, welcome_message]] # Initialize with welcome message
290
  )
291
  # If an upload folder is provided, enable the upload feature
292
  if self.file_upload_folder is not None: