Download app.py from JosephH/Test: direct link, hf CLI and curl.
- Browser
- Download file 241 Bytes
-
https://huggingface.co/spaces/JosephH/Test/resolve/main/app.py
- Command line
-
hf download hf://spaces/JosephH/Test/app.py
-
curl -L -o app.py https://huggingface.co/spaces/JosephH/Test/resolve/main/app.py
241 Bytes
| import gradio as gr | |
| from model import GPT2PPLV2 as GPT2PPL | |
| # initialize the model | |
| model = GPT2PPL() | |
| def greet(sentence): | |
| return model(sentence, 512, "v1.1") | |
| demo = gr.Interface(fn=greet, inputs="text", outputs="text") | |
| demo.launch() |