Spaces:
Runtime error
Runtime error
Leonardo
commited on
Update scripts/document_tool.py
Browse files- scripts/document_tool.py +2 -0
scripts/document_tool.py
CHANGED
|
@@ -13,6 +13,7 @@ import os
|
|
| 13 |
import re
|
| 14 |
import time
|
| 15 |
import tempfile
|
|
|
|
| 16 |
import numpy as np
|
| 17 |
from tqdm import tqdm
|
| 18 |
|
|
@@ -400,6 +401,7 @@ class LegalDocumentTool(Tool):
|
|
| 400 |
# Clean up the temporary file
|
| 401 |
os.remove(temp_path)
|
| 402 |
|
|
|
|
| 403 |
def forward(
|
| 404 |
self,
|
| 405 |
text: Optional[str] = None,
|
|
|
|
| 13 |
import re
|
| 14 |
import time
|
| 15 |
import tempfile
|
| 16 |
+
import spaces
|
| 17 |
import numpy as np
|
| 18 |
from tqdm import tqdm
|
| 19 |
|
|
|
|
| 401 |
# Clean up the temporary file
|
| 402 |
os.remove(temp_path)
|
| 403 |
|
| 404 |
+
@spaces.GPU
|
| 405 |
def forward(
|
| 406 |
self,
|
| 407 |
text: Optional[str] = None,
|