Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -44,6 +44,16 @@ agent = CodeAgent(
|
|
| 44 |
prompt_templates=prompt_templates
|
| 45 |
)
|
| 46 |
if __name__ == "__main__":
|
| 47 |
-
import gradio
|
| 48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
GradioUI(agent).launch()
|
|
|
|
| 44 |
prompt_templates=prompt_templates
|
| 45 |
)
|
| 46 |
if __name__ == "__main__":
|
| 47 |
+
import gradio as gr
|
| 48 |
+
from smolagents import GradioUI
|
| 49 |
+
|
| 50 |
+
# Monkey-patch Blocks to ignore unknown kwargs
|
| 51 |
+
_old_blocks = gr.Blocks
|
| 52 |
+
|
| 53 |
+
def PatchedBlocks(*args, **kwargs):
|
| 54 |
+
kwargs.pop("theme", None)
|
| 55 |
+
return _old_blocks(*args, **kwargs)
|
| 56 |
+
|
| 57 |
+
gr.Blocks = PatchedBlocks
|
| 58 |
+
|
| 59 |
GradioUI(agent).launch()
|