Spaces:
Runtime error
Runtime error
Download app.py from PeacefulParenting/demo: direct link, hf CLI and curl.
- Browser
- Download file 305 Bytes
-
https://huggingface.co/spaces/PeacefulParenting/demo/resolve/main/app.py
- Command line
-
hf download hf://spaces/PeacefulParenting/demo/app.py
-
curl -L -o app.py https://huggingface.co/spaces/PeacefulParenting/demo/resolve/main/app.py
305 Bytes
| from transformers import pipeline | |
| import gradio as gr | |
| model = pipeline( | |
| "summarization", | |
| ) | |
| def predict(prompt): | |
| summary = model(prompt)[0]["summary_text"] | |
| return summary | |
| # create an interface for the model | |
| with gr.Interface(predict, "textbox", "text") as interface: | |
| interface.launch() |