Spaces:
Runtime error
Runtime error
Updated app.py
Browse files
app.py
CHANGED
@@ -1,26 +1,26 @@
|
|
1 |
import streamlit as st
|
2 |
import pandas as pd
|
3 |
import altair as alt
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
import numpy as np
|
8 |
import sys
|
9 |
import json
|
10 |
-
|
11 |
-
|
12 |
import logging
|
13 |
from datetime import datetime
|
14 |
import gzip
|
15 |
import os
|
16 |
import tarfile
|
17 |
from collections import defaultdict
|
18 |
-
|
19 |
import tqdm
|
20 |
-
|
21 |
import random
|
22 |
from shutil import copyfile
|
23 |
-
|
24 |
|
25 |
# Load document embeddings
|
26 |
|
|
|
1 |
import streamlit as st
|
2 |
import pandas as pd
|
3 |
import altair as alt
|
4 |
+
pip install -U sentence-transformers
|
5 |
+
from sentence_transformers import SentenceTransformer, util
|
6 |
+
from sentence_transformers import SentenceTransformer
|
7 |
import numpy as np
|
8 |
import sys
|
9 |
import json
|
10 |
+
from torch.utils.data import DataLoader
|
11 |
+
from sentence_transformers import SentenceTransformer, LoggingHandler, util, models, evaluation, losses, InputExample
|
12 |
import logging
|
13 |
from datetime import datetime
|
14 |
import gzip
|
15 |
import os
|
16 |
import tarfile
|
17 |
from collections import defaultdict
|
18 |
+
from torch.utils.data import IterableDataset
|
19 |
import tqdm
|
20 |
+
from torch.utils.data import Dataset
|
21 |
import random
|
22 |
from shutil import copyfile
|
23 |
+
from urllib.error import URLError
|
24 |
|
25 |
# Load document embeddings
|
26 |
|