Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

Fix/gradio 6.3 compatibility (#810)

Weichen Zhang8ecfacf2ad35
diff --git a/libs/python/agent/agent/human_tool/ui.py b/libs/python/agent/agent/human_tool/ui.py
index ae6b54050b..8a0385053d 100644
--- a/libs/python/agent/agent/human_tool/ui.py
+++ b/libs/python/agent/agent/human_tool/ui.py
@@ -475,7 +475,7 @@ def create_ui():
)
conversation_chatbot = gr.Chatbot(
- label="Conversation", type="messages", height=500, show_copy_button=True
+ label="Conversation", height=500, buttons=["copy"]
)
with gr.Column(scale=1):
diff --git a/libs/python/agent/agent/ui/gradio/ui_components.py b/libs/python/agent/agent/ui/gradio/ui_components.py
index 81c83d09c1..8613484240 100644
--- a/libs/python/agent/agent/ui/gradio/ui_components.py
+++ b/libs/python/agent/agent/ui/gradio/ui_components.py
@@ -562,7 +562,7 @@ if __name__ == "__main__":
"Ask me to perform tasks in a virtual environment.<br>Built with <a href='https://github.com/trycua/cua' target='_blank'>github.com/trycua/cua</a>."
)
- chatbot_history = gr.Chatbot(type="messages")
+ chatbot_history = gr.Chatbot()
msg = gr.Textbox(placeholder="Ask me to perform tasks in a virtual environment")
clear = gr.Button("Clear")
cancel_button = gr.Button("Cancel", variant="stop")
diff --git a/libs/python/agent/pyproject.toml b/libs/python/agent/pyproject.toml
index fe601deb74..0ba8ee8308 100644
--- a/libs/python/agent/pyproject.toml
+++ b/libs/python/agent/pyproject.toml
@@ -71,7 +71,7 @@ moondream3 = [
"transformers>=4.55.0"
]
ui = [
- "gradio>=5.23.3",
+ "gradio>=6.0.0",
"python-dotenv>=1.0.1",
]
cli = [
@@ -96,7 +96,7 @@ all = [
"tiktoken>=0.11.0",
"blobfile>=3.0.0",
# ui requirements
- "gradio>=5.23.3",
+ "gradio>=6.0.0",
"python-dotenv>=1.0.1",
# cli requirements
"yaspin>=3.1.0",