Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,6 @@ from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
|
4 |
# Load the model and tokenizer from Hugging Face Model Hub
|
5 |
tokenizer = AutoTokenizer.from_pretrained("zeyadusf/FlanT5Summarization-samsum")
|
6 |
model = AutoModelForSeq2SeqLM.from_pretrained("zeyadusf/FlanT5Summarization-samsum")
|
7 |
-
model.config.quantization_config = None # Ensure quantization config is not applied
|
8 |
|
9 |
def summarize(text):
|
10 |
inputs = tokenizer(text, return_tensors="pt", truncation=True)
|
|
|
4 |
# Load the model and tokenizer from Hugging Face Model Hub
|
5 |
tokenizer = AutoTokenizer.from_pretrained("zeyadusf/FlanT5Summarization-samsum")
|
6 |
model = AutoModelForSeq2SeqLM.from_pretrained("zeyadusf/FlanT5Summarization-samsum")
|
|
|
7 |
|
8 |
def summarize(text):
|
9 |
inputs = tokenizer(text, return_tensors="pt", truncation=True)
|