Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,11 +1,10 @@
|
|
1 |
import os
|
2 |
import gradio as gr
|
3 |
from transformers import ReactCodeAgent, HfEngine, Tool
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
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 =
|
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 |
|