Update app.py
Browse files
app.py
CHANGED
@@ -11,15 +11,15 @@ import uuid
|
|
11 |
from sentence_transformers import SentenceTransformer
|
12 |
import os
|
13 |
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
|
19 |
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
|
24 |
|
25 |
def get_context(query_text):
|
|
|
11 |
from sentence_transformers import SentenceTransformer
|
12 |
import os
|
13 |
|
14 |
+
model_name = 'google/flan-t5-base'
|
15 |
+
model = T5ForConditionalGeneration.from_pretrained(model_name, device_map='auto', offload_folder="offload")
|
16 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
17 |
+
print('flan read')
|
18 |
|
19 |
|
20 |
+
ST_name = 'sentence-transformers/sentence-t5-base'
|
21 |
+
st_model = SentenceTransformer(ST_name)
|
22 |
+
print('sentence read')
|
23 |
|
24 |
|
25 |
def get_context(query_text):
|