Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -35,7 +35,7 @@ t5_tokenizer = T5Tokenizer.from_pretrained("google/flan-t5-large")
|
|
35 |
t5_model = T5ForConditionalGeneration.from_pretrained("google/flan-t5-large", device_map="auto")
|
36 |
|
37 |
def flan_t5_complete_sentence(question, answer):
|
38 |
-
input_text = f"A question: {question} An
|
39 |
logger.info("T5 input: " + input_text)
|
40 |
inputs = t5_tokenizer(input_text, return_tensors="pt")
|
41 |
outputs = t5_model.generate(**inputs, max_length=50)
|
|
|
35 |
t5_model = T5ForConditionalGeneration.from_pretrained("google/flan-t5-large", device_map="auto")
|
36 |
|
37 |
def flan_t5_complete_sentence(question, answer):
|
38 |
+
input_text = f"A question: {question} An answer: {answer}. Based on these, answer the question with a complete sentence without extra information."
|
39 |
logger.info("T5 input: " + input_text)
|
40 |
inputs = t5_tokenizer(input_text, return_tensors="pt")
|
41 |
outputs = t5_model.generate(**inputs, max_length=50)
|