Spaces:
Runtime error
Runtime error
Download app.py from git-excited/VocalityDemo: direct link, hf CLI and curl.
- Browser
- Download file 269 Bytes
-
https://huggingface.co/spaces/git-excited/VocalityDemo/resolve/main/app.py
- Command line
-
hf download hf://spaces/git-excited/VocalityDemo/app.py
-
curl -L -o app.py https://huggingface.co/spaces/git-excited/VocalityDemo/resolve/main/app.py
269 Bytes
| import gradio as gr | |
| from transformers import pipeline | |
| model = pipeline("text-generation", model="gpt2") | |
| def predict(prompt): | |
| completion = model(prompt)[0]["generated_text"] | |
| return completion | |
| gr.Interface(fn=predict, inputs="text", outputs="text").launch() | |