callanwu commited on
Commit
c6f0134
1 Parent(s): 870e141
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -28,6 +28,8 @@ class CodeUI(WebUI):
28
 
29
  def construct_ui(self):
30
  with gr.Blocks(css=gc.CSS) as demo:
 
 
31
  with gr.Row():
32
  with gr.Column():
33
  self.text_api = gr.Textbox(
@@ -121,6 +123,8 @@ class CodeUI(WebUI):
121
  self.data_history.append({agent_name: token})
122
  elif state % 10 == 1:
123
  # Same state. Need to add new bubble in same bubble.
 
 
124
  self.data_history[-1][agent_name] += token
125
  elif state % 10 == 2:
126
  # New state. Need to add new bubble.
 
28
 
29
  def construct_ui(self):
30
  with gr.Blocks(css=gc.CSS) as demo:
31
+ gr.Markdown("""# Agents""")
32
+ gr.Markdown("""**Agents** is an open-source library/framework for building autonomous language agents.if you want to know more about **Agents**, please check our<a href="https://arxiv.org/pdf/2309.07870.pdf">📄 Paper</a> and<a href="http://www.aiwaves-agents.com/">📦 Github</a>. Here is a demo of **Agents**.""")
33
  with gr.Row():
34
  with gr.Column():
35
  self.text_api = gr.Textbox(
 
123
  self.data_history.append({agent_name: token})
124
  elif state % 10 == 1:
125
  # Same state. Need to add new bubble in same bubble.
126
+ if len(self.data_history) == 0:
127
+ self.data_history.append({agent_name:""})
128
  self.data_history[-1][agent_name] += token
129
  elif state % 10 == 2:
130
  # New state. Need to add new bubble.