Spaces:
Running
Running
File size: 553 Bytes
c309a91 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | from gradio_client import Client
def summarize_text(text):
"""
Summarizes the given text using the IotaCluster/Summarizer Gradio API (new endpoint).
Args:
text (str): The text to summarize.
Returns:
str: The summarized text from the API.
"""
client = Client("IotaCluster/Summarizer")
result = client.predict(
text=text,
api_name="/predict"
)
return result
# Example usage
if __name__ == "__main__":
summary = summarize_text("Hello!!")
print(summary)
|