Commit
·
e9b803a
1
Parent(s):
15761f9
change requirements
Browse files- app.py +20 -14
- requirements.txt +1 -1
app.py
CHANGED
@@ -10,7 +10,7 @@ import re
|
|
10 |
import nltk
|
11 |
from nltk.corpus import stopwords
|
12 |
from nltk.stem import WordNetLemmatizer
|
13 |
-
from google_drive_downloader import GoogleDriveDownloader as gdd
|
14 |
# Download NLTK resources if not already downloaded
|
15 |
nltk.download('stopwords')
|
16 |
nltk.download('wordnet')
|
@@ -18,21 +18,27 @@ nltk.download('omw-1.4')
|
|
18 |
|
19 |
|
20 |
# --------------------------- Dynamic Download of Large Files --------------------------- #
|
|
|
21 |
|
|
|
|
|
|
|
|
|
|
|
22 |
# Download LanceDB
|
23 |
-
gdd.download_file_from_google_drive(
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
)
|
28 |
-
|
29 |
-
# Download fine-tuned model
|
30 |
-
gdd.download_file_from_google_drive(
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
)
|
35 |
-
# --------------------------- Load the LanceDB Table and Models --------------------------- #
|
36 |
|
37 |
# Connect to LanceDB
|
38 |
DB_PATH = "/lancedb_directory_main"
|
|
|
10 |
import nltk
|
11 |
from nltk.corpus import stopwords
|
12 |
from nltk.stem import WordNetLemmatizer
|
13 |
+
# from google_drive_downloader import GoogleDriveDownloader as gdd
|
14 |
# Download NLTK resources if not already downloaded
|
15 |
nltk.download('stopwords')
|
16 |
nltk.download('wordnet')
|
|
|
18 |
|
19 |
|
20 |
# --------------------------- Dynamic Download of Large Files --------------------------- #
|
21 |
+
import gdown
|
22 |
|
23 |
+
# Example for LanceDB
|
24 |
+
gdown.download("https://drive.google.com/uc?id=1N7B1ycXbmEPZXRft8OTjvCxcfz92bf", "lancedb_directory_main.zip", quiet=False)
|
25 |
+
|
26 |
+
# Example for the Fine-Tuned Model
|
27 |
+
gdown.download("https://drive.google.com/uc?id=13ahw_99cSwlW5_U6-MrkIlB9uYy3Zwty", "finetuned_all_minilm_l6_v2.zip", quiet=False)
|
28 |
# Download LanceDB
|
29 |
+
# gdd.download_file_from_google_drive(
|
30 |
+
# file_id='1N7B1ycXbmEPZXRft8OTjvCxcfz92bfku', # Replace with your actual file ID
|
31 |
+
# dest_path='./lancedb_directory_main.zip',
|
32 |
+
# unzip=True
|
33 |
+
# )
|
34 |
+
|
35 |
+
# # Download fine-tuned model
|
36 |
+
# gdd.download_file_from_google_drive(
|
37 |
+
# file_id='13ahw_99cSwlW5_U6-MrkIlB9uYy3Zwty', # Replace with your actual file ID
|
38 |
+
# dest_path='./finetuned_all_minilm_l6_v2.zip',
|
39 |
+
# unzip=True
|
40 |
+
# )
|
41 |
+
# # --------------------------- Load the LanceDB Table and Models --------------------------- #
|
42 |
|
43 |
# Connect to LanceDB
|
44 |
DB_PATH = "/lancedb_directory_main"
|
requirements.txt
CHANGED
@@ -5,5 +5,5 @@ torch
|
|
5 |
sentence-transformers
|
6 |
lancedb
|
7 |
nltk
|
8 |
-
|
9 |
transformers
|
|
|
5 |
sentence-transformers
|
6 |
lancedb
|
7 |
nltk
|
8 |
+
gdown
|
9 |
transformers
|