Spaces:
Build error
Build error
| import gradio as gr | |
| from huggingface_hub import InferenceClient | |
| def summarize(text): | |
| client = InferenceClient() | |
| return client.summarization( | |
| text, | |
| model="facebook/bart-large-cnn" | |
| ).summary_text | |
| with gr.Blocks() as demo: | |
| t1 = gr.Textbox() | |
| t2 = gr.Textbox() | |
| t1.submit(summarize, t1, t2) | |
| demo.launch() | |