ShAnSantosh commited on
Commit
0819795
1 Parent(s): 80dfbce

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -10
app.py CHANGED
@@ -3,14 +3,8 @@ import transformers
3
  from transformers import BertTokenizer, BertForMaskedLM
4
  import gradio as gr
5
 
6
- device = torch.device('cpu')
 
7
 
8
- NUM_CLASSES=6
9
-
10
- def test():
11
- return {"token": 0.57}
12
-
13
- gr.Interface(fn=test,
14
- inputs=gr.inputs.Textbox(lines=2, placeholder="Your Text… "),
15
- title="Mask Language Modeling - Demo",
16
- outputs=gr.outputs.Label(num_top_classes=1)).launch()
 
3
  from transformers import BertTokenizer, BertForMaskedLM
4
  import gradio as gr
5
 
6
+ def greet(name):
7
+ return "Hello " + name + "!"
8
 
9
+ demo = gr.Interface(fn=greet, inputs="text", outputs="text")
10
+ demo.launch()