dammy commited on
Commit
2cd4e0a
·
1 Parent(s): 2aaf722

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -11,15 +11,15 @@ import uuid
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):
 
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):