Pavankalyan
commited on
Commit
β’
3305372
1
Parent(s):
a6276d7
Update app.py
Browse files
app.py
CHANGED
@@ -10,12 +10,6 @@ model = T5ForConditionalGeneration.from_pretrained("./model_files")
|
|
10 |
def greet(name):
|
11 |
inp = "Summarize:" + name
|
12 |
input_ids = tokenizer(inp, return_tensors="pt").input_ids
|
13 |
-
outputs = model.generate(input_ids,
|
14 |
-
max_length=150,
|
15 |
-
num_beams=2,
|
16 |
-
repetition_penalty=2.5,
|
17 |
-
length_penalty=1.0,
|
18 |
-
early_stopping=True)
|
19 |
#return tokenizer.decode(outputs[0],skip_special_tokens=True, clean_up_tokenization_spaces=True)
|
20 |
return inp
|
21 |
|
|
|
10 |
def greet(name):
|
11 |
inp = "Summarize:" + name
|
12 |
input_ids = tokenizer(inp, return_tensors="pt").input_ids
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
#return tokenizer.decode(outputs[0],skip_special_tokens=True, clean_up_tokenization_spaces=True)
|
14 |
return inp
|
15 |
|