piotrekgrl commited on
Commit
fe8007f
·
1 Parent(s): 4438281

disclaimer

Browse files
Files changed (1) hide show
  1. ui.py +10 -2
ui.py CHANGED
@@ -4,7 +4,7 @@ from smolagents.tools import Tool
4
 
5
 
6
  HEADER = """ ## Python debugger for Agents
7
- The goal of the tool is to provide agents with the ability to debug and resolve bugs in code generated by LLMs.
8
  """
9
 
10
  ARTICLE_INTRO = """---
@@ -47,6 +47,14 @@ agent.run(
47
  """
48
 
49
 
 
 
 
 
 
 
 
 
50
  def custom_launch_gradio_demo(tool: Tool):
51
  TYPE_TO_COMPONENT_CLASS_MAPPING = {
52
  "image": gr.Image,
@@ -77,7 +85,7 @@ def custom_launch_gradio_demo(tool: Tool):
77
  inputs=gradio_inputs,
78
  outputs=gradio_output,
79
  title=tool.name,
80
- article=ARTICLE_INTRO + "\n" + tool.description,
81
  description=HEADER,
82
  api_name=tool.name,
83
  ).launch()
 
4
 
5
 
6
  HEADER = """ ## Python debugger for Agents
7
+ The goal of the tool is to provide agents ability to debug and resolve bugs in code generated by LLMs.
8
  """
9
 
10
  ARTICLE_INTRO = """---
 
47
  """
48
 
49
 
50
+ ARTICLE_OUTRO = """---
51
+ ## Disclaimer
52
+ This tool is running code generated by LLM in local python environment.
53
+ Under the hood, it utilizes the [LocalPythonInterpreter from smolagents](https://huggingface.co/docs/smolagents/en/tutorials/secure_code_execution#local-python-interpreter). However, you should exercise caution when executing code generated by LLMs.
54
+ This application is provided 'as is' without any guarantees. Use at your own risk."
55
+ """
56
+
57
+
58
  def custom_launch_gradio_demo(tool: Tool):
59
  TYPE_TO_COMPONENT_CLASS_MAPPING = {
60
  "image": gr.Image,
 
85
  inputs=gradio_inputs,
86
  outputs=gradio_output,
87
  title=tool.name,
88
+ article=ARTICLE_INTRO + "\n" + tool.description + "\n" + ARTICLE_OUTRO,
89
  description=HEADER,
90
  api_name=tool.name,
91
  ).launch()