m-ric HF staff commited on
Commit
76b8fa2
1 Parent(s): 16bb623

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -1,11 +1,10 @@
1
  import os
2
  import gradio as gr
3
  from transformers import ReactCodeAgent, HfEngine, Tool
4
- from gradio_agentchatbot import (
5
- AgentChatbot,
6
- stream_from_transformers_agent,
7
- ChatMessage,
8
- )
9
  from dotenv import load_dotenv
10
  from huggingface_hub import login
11
  from transformers.agents.default_tools import (
@@ -128,7 +127,7 @@ Write your function in the left textbox, and the agent on the right will generat
128
  )
129
  submit = gr.Button("Generate tests!")
130
  with gr.Column():
131
- chatbot = AgentChatbot(label="Agent")
132
 
133
  submit.click(interact_with_agent, [text_input], [chatbot])
134
 
 
1
  import os
2
  import gradio as gr
3
  from transformers import ReactCodeAgent, HfEngine, Tool
4
+
5
+ from gradio import ChatMessage
6
+ from gradio.utils import stream_from_transformers_agent
7
+
 
8
  from dotenv import load_dotenv
9
  from huggingface_hub import login
10
  from transformers.agents.default_tools import (
 
127
  )
128
  submit = gr.Button("Generate tests!")
129
  with gr.Column():
130
+ chatbot = gr.Chatbot(label="Agent")
131
 
132
  submit.click(interact_with_agent, [text_input], [chatbot])
133