Spaces:
Sleeping
Sleeping
| from model import load_model | |
| # Initialize the model | |
| model = load_model() | |
| def summarize_text(input_text: str) -> str: | |
| """ | |
| Summarize the input text using the pre-trained Hugging Face model. | |
| """ | |
| # Get the summary | |
| summary = model(input_text, max_length=200, min_length=50, do_sample=False) | |
| return summary[0]['summary_text'] | |