Spaces:
Build error
Build error
Commit ·
e17086d
1
Parent(s): c94cef8
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,7 +10,7 @@ def evaluate(sentence):
|
|
| 10 |
model = T5ForConditionalGeneration.from_pretrained('Salesforce/codet5-base-multi-sum')
|
| 11 |
|
| 12 |
# Prepare the input text
|
| 13 |
-
input_text =
|
| 14 |
input_ids = tokenizer.encode(input_text, return_tensors='pt')
|
| 15 |
# Generate a summary
|
| 16 |
generated_ids = model.generate(input_ids, max_length=20)
|
|
|
|
| 10 |
model = T5ForConditionalGeneration.from_pretrained('Salesforce/codet5-base-multi-sum')
|
| 11 |
|
| 12 |
# Prepare the input text
|
| 13 |
+
input_text = sentence.strip()
|
| 14 |
input_ids = tokenizer.encode(input_text, return_tensors='pt')
|
| 15 |
# Generate a summary
|
| 16 |
generated_ids = model.generate(input_ids, max_length=20)
|