Spaces:
Runtime error
Runtime error
File size: 258 Bytes
47b4017 | 1 2 3 4 5 6 7 8 9 10 11 12 13 | from huggingface_hub import InferenceClient
import os
client = InferenceClient(token=os.getenv("HF_TOKEN"))
def summarize_text(text):
response = client.summarization(
text,
model="facebook/bart-large-cnn"
)
return response["summary_text"]
|