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