Spaces:
Sleeping
Sleeping
| from transformers import pipeline | |
| model = pipeline("summarization", model="eliori/dialogue_summarization-finetuned") | |
| def summarize(prompt): | |
| completion = model(prompt)[0]["summary_text"] | |
| return completion | |
| title = "Write or Paste in a Dialogue" | |
| description = """ | |
| This model is used to summarize dialogues. | |
| """ | |
| import gradio as gr | |
| # from huggingface_hub import InferenceClient | |
| gr.Interface( | |
| fn=summarize, | |
| inputs="textbox", | |
| outputs="text", | |
| title=title, | |
| description=description, | |
| examples=[["#Person1#: (dialogue) #Person2#: (response to dialogue)"]], | |
| ).launch() |