| import gradio as gr | |
| from transformers import pipeline | |
| fill = pipeline("fill-mask", model="SI2M-Lab/DarijaBERT") | |
| def complete_phrase(text): | |
| results = fill(text) | |
| return [r["sequence"] for r in results] | |
| gr.Interface(fn=complete_phrase, inputs="text", outputs="textbox").launch() | |