Spaces:
Sleeping
Sleeping
Update Gradio_UI.py
Browse files- 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
|
| 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 |
)
|