Quivering commited on
Commit
0b0b003
·
2 Parent(s): 3d594d7 28d8145

Merge branch 'feature/welcome_message'

Browse files
Files changed (1) hide show
  1. Gradio_UI.py +26 -3
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
@@ -273,12 +297,11 @@ class GradioUI:
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",
 
282
  type="messages",
283
  avatar_images=(
284
  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
 
297
  )
298
 
299
  with gr.Blocks(fill_height=True) as demo:
300
+ stored_messages = gr.State([])
 
 
301
  file_uploads_log = gr.State([])
302
  chatbot = gr.Chatbot(
303
  label="Agent",
304
+ value=[[None, self.welcome_message]], # Set initial message
305
  type="messages",
306
  avatar_images=(
307
  None,