Spaces:
Runtime error
Runtime error
Download app.py from eadsa1998/predreambert-v1.2: direct link, hf CLI and curl.
- Browser
- Download file 278 Bytes
-
https://huggingface.co/spaces/eadsa1998/predreambert-v1.2/resolve/main/app.py
- Command line
-
hf download hf://spaces/eadsa1998/predreambert-v1.2/app.py
-
curl -L -o app.py https://huggingface.co/spaces/eadsa1998/predreambert-v1.2/resolve/main/app.py
278 Bytes
| import gradio as gr | |
| from transformers import pipeline | |
| def fill_mask_output(text): | |
| mask_filler = pipeline( | |
| "fill-mask", model="dreambert-fill-mask") | |
| return mask_filler(text) | |
| iface = gr.Interface(fn=fill_mask_output, inputs="text", outputs="text") | |
| iface.launch() |