RSHVR commited on
Commit
8db1a8d
·
verified ·
1 Parent(s): 772f5c4

Update Gradio_UI.py

Browse files
Files changed (1) hide show
  1. Gradio_UI.py +1 -1
Gradio_UI.py CHANGED
@@ -130,7 +130,7 @@ def stream_to_gradio(
130
  additional_args: Optional[dict] = None,
131
  ):
132
  """Runs an agent with the given task and streams the messages from the agent as gradio ChatMessages."""
133
- if not is_package_available("gradio"):
134
  raise ModuleNotFoundError(
135
  "Please install 'gradio' extra to use the GradioUI: `pip install 'smolagents[gradio]'`"
136
  )
 
130
  additional_args: Optional[dict] = None,
131
  ):
132
  """Runs an agent with the given task and streams the messages from the agent as gradio ChatMessages."""
133
+ if not _is_package_available("gradio"):
134
  raise ModuleNotFoundError(
135
  "Please install 'gradio' extra to use the GradioUI: `pip install 'smolagents[gradio]'`"
136
  )