Spaces:
Sleeping
Sleeping
peterbonnesoeur
commited on
Commit
·
cbb18dd
1
Parent(s):
33b3806
Added optional typing
Browse files
app.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
from smolagents import launch_gradio_demo
|
|
|
2 |
from tool import TranslateTool
|
3 |
|
4 |
tool = TranslateTool()
|
|
|
1 |
from smolagents import launch_gradio_demo
|
2 |
+
from typing import Optional
|
3 |
from tool import TranslateTool
|
4 |
|
5 |
tool = TranslateTool()
|
tool.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import asyncio
|
2 |
from smolagents import Tool
|
3 |
from googletrans import Translator
|
|
|
4 |
|
5 |
|
6 |
class TranslateTool(Tool):
|
|
|
1 |
import asyncio
|
2 |
from smolagents import Tool
|
3 |
from googletrans import Translator
|
4 |
+
from typing import Optional
|
5 |
|
6 |
|
7 |
class TranslateTool(Tool):
|