Update app.py
Browse filesrevised type and import errors
app.py
CHANGED
@@ -1,15 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
1 |
from scipy.sparse._csc import csc_matrix
|
2 |
import numpy as np
|
3 |
import gradio as gr
|
4 |
|
5 |
-
from typing import TypedDict
|
6 |
from dataclasses import dataclass
|
7 |
|
8 |
from dataclasses import dataclass
|
9 |
import pickle
|
10 |
import os
|
11 |
from typing import Iterable, Callable, List, Dict, Optional, Type, TypeVar
|
12 |
-
from
|
|
|
13 |
from collections import Counter
|
14 |
import tqdm
|
15 |
import re
|
|
|
1 |
+
from __future__ import annotations
|
2 |
+
|
3 |
+
from nlp4web_codebase.ir.data_loaders.dm import Document
|
4 |
+
from nlp4web_codebase.ir.models import BaseRetriever
|
5 |
+
|
6 |
from scipy.sparse._csc import csc_matrix
|
7 |
import numpy as np
|
8 |
import gradio as gr
|
9 |
|
10 |
+
from typing import TypedDict, Type
|
11 |
from dataclasses import dataclass
|
12 |
|
13 |
from dataclasses import dataclass
|
14 |
import pickle
|
15 |
import os
|
16 |
from typing import Iterable, Callable, List, Dict, Optional, Type, TypeVar
|
17 |
+
from abc import abstractmethod
|
18 |
+
|
19 |
from collections import Counter
|
20 |
import tqdm
|
21 |
import re
|