Update app.py
Browse files
app.py
CHANGED
@@ -10,8 +10,7 @@ import gradio as gr
|
|
10 |
import uuid
|
11 |
from sentence_transformers import SentenceTransformer
|
12 |
import os
|
13 |
-
|
14 |
-
global file_name
|
15 |
|
16 |
model_name = 'google/flan-t5-base'
|
17 |
model = T5ForConditionalGeneration.from_pretrained(model_name, device_map='auto', offload_folder="offload")
|
@@ -39,7 +38,7 @@ def local_query(query, context):
|
|
39 |
""".format(context, query)
|
40 |
|
41 |
print('t5 query is')
|
42 |
-
|
43 |
|
44 |
inputs = tokenizer(t5query, return_tensors="pt")
|
45 |
|
|
|
10 |
import uuid
|
11 |
from sentence_transformers import SentenceTransformer
|
12 |
import os
|
13 |
+
|
|
|
14 |
|
15 |
model_name = 'google/flan-t5-base'
|
16 |
model = T5ForConditionalGeneration.from_pretrained(model_name, device_map='auto', offload_folder="offload")
|
|
|
38 |
""".format(context, query)
|
39 |
|
40 |
print('t5 query is')
|
41 |
+
print(t5query)
|
42 |
|
43 |
inputs = tokenizer(t5query, return_tensors="pt")
|
44 |
|