type error
Browse files
app.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
import streamlit as st
|
|
|
|
| 2 |
import textract
|
| 3 |
import tempfile
|
| 4 |
import spacy
|
|
@@ -30,7 +31,7 @@ def download_model(language:str, select_model:str):
|
|
| 30 |
except Exception as e:
|
| 31 |
return False
|
| 32 |
|
| 33 |
-
def search_docs(query:str, documents:
|
| 34 |
terms = query.split('|')
|
| 35 |
patterns = [nlp.make_doc(text) for text in terms]
|
| 36 |
matcher = PhraseMatcher(nlp.vocab)
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
+
from typing import List
|
| 3 |
import textract
|
| 4 |
import tempfile
|
| 5 |
import spacy
|
|
|
|
| 31 |
except Exception as e:
|
| 32 |
return False
|
| 33 |
|
| 34 |
+
def search_docs(query:str, documents:List[Doc], nlp) -> List[Span]:
|
| 35 |
terms = query.split('|')
|
| 36 |
patterns = [nlp.make_doc(text) for text in terms]
|
| 37 |
matcher = PhraseMatcher(nlp.vocab)
|