tiantian-paris commited on
Commit
9368da7
·
1 Parent(s): c9b87b1
Gradio_UI.py CHANGED
@@ -260,7 +260,23 @@ class GradioUI:
260
 
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([])
@@ -273,9 +289,8 @@ class GradioUI:
273
  ),
274
  resizeable=True,
275
  scale=1,
276
- description="Interact with MyAgent, a custom chatbot powered by Qwen2.5-Coder-32B-Instruct.",
277
  # Description
278
- examples=["Calculate the VaR for returns: 0.1, -0.2, 0.05, -0.15, 0.3"], # Example inputs
279
  )
280
  # If an upload folder is provided, enable the upload feature
281
  if self.file_upload_folder is not None:
 
260
 
261
  def launch(self, **kwargs):
262
  import gradio as gr
263
+ examples = [
264
+ {
265
+ "text": "Calculate the VaR for returns: 0.1, -0.2, 0.05, -0.15, 0.3", # Message to populate
266
+ "display_text": "Example 1: Calculate VaR", # Text to display in the example box
267
+
268
+ # Optional icon
269
+ },
270
+ {
271
+ "text": "Explain the concept of gradient descent.", # Message to populate
272
+ "display_text": "Example 2: Gradient Descent", # Text to display in the example box
273
+ # Optional icon
274
+ },
275
+ {
276
+ "text": "What is the capital of France?", # Message to populate
277
+ "display_text": "Example 3: Capital of France", # Text to display in the example box
278
+ },
279
+ ]
280
  with gr.Blocks(fill_height=True) as demo:
281
  stored_messages = gr.State([])
282
  file_uploads_log = gr.State([])
 
289
  ),
290
  resizeable=True,
291
  scale=1,
 
292
  # Description
293
+ examples=examples, # Example inputs
294
  )
295
  # If an upload folder is provided, enable the upload feature
296
  if self.file_upload_folder is not None:
__pycache__/Gradio_UI.cpython-312.pyc CHANGED
Binary files a/__pycache__/Gradio_UI.cpython-312.pyc and b/__pycache__/Gradio_UI.cpython-312.pyc differ