prashant
commited on
Commit
•
f21be08
1
Parent(s):
cd8693c
type fix
Browse files
udfPreprocess/preprocessing.py
CHANGED
@@ -2,7 +2,7 @@ from haystack.nodes.base import BaseComponent
|
|
2 |
from haystack.schema import Document
|
3 |
from haystack.nodes import PDFToTextOCRConverter, PDFToTextConverter
|
4 |
from haystack.nodes import TextConverter, DocxToTextConverter, PreProcessor
|
5 |
-
from typing import Callable, Dict, List, Optional, Text, Union
|
6 |
from typing_extensions import Literal
|
7 |
import pandas as pd
|
8 |
import logging
|
@@ -55,7 +55,7 @@ class FileConverter(BaseComponent):
|
|
55 |
|
56 |
def run(self, file_name: str , file_path: str, encoding: Optional[str]=None,
|
57 |
id_hash_keys: Optional[List[str]] = None,
|
58 |
-
) ->
|
59 |
""" this is required method to invoke the component in
|
60 |
the pipeline implementation.
|
61 |
|
|
|
2 |
from haystack.schema import Document
|
3 |
from haystack.nodes import PDFToTextOCRConverter, PDFToTextConverter
|
4 |
from haystack.nodes import TextConverter, DocxToTextConverter, PreProcessor
|
5 |
+
from typing import Callable, Dict, List, Optional, Text, Tuple, Union
|
6 |
from typing_extensions import Literal
|
7 |
import pandas as pd
|
8 |
import logging
|
|
|
55 |
|
56 |
def run(self, file_name: str , file_path: str, encoding: Optional[str]=None,
|
57 |
id_hash_keys: Optional[List[str]] = None,
|
58 |
+
) -> Tuple[dict,str]:
|
59 |
""" this is required method to invoke the component in
|
60 |
the pipeline implementation.
|
61 |
|