ShAnSantosh's picture
Update app.py
80dfbce
raw
history blame
417 Bytes
import torch
import transformers
from transformers import BertTokenizer, BertForMaskedLM
import gradio as gr
device = torch.device('cpu')
NUM_CLASSES=6
def test():
return {"token": 0.57}
gr.Interface(fn=test,
inputs=gr.inputs.Textbox(lines=2, placeholder="Your Text… "),
title="Mask Language Modeling - Demo",
outputs=gr.outputs.Label(num_top_classes=1)).launch()