Farsi, Ali commited on
Commit
83c002a
β€’
1 Parent(s): ec8a922
Files changed (1) hide show
  1. app.py +9 -2
app.py CHANGED
@@ -1,7 +1,14 @@
1
  import gradio as gr
 
 
 
 
 
 
2
 
3
  def greet(name):
4
  return "Hello " + name + "!!"
5
 
6
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
7
- iface.launch()
 
 
1
  import gradio as gr
2
+ from transformers import AutoTokenizer
3
+
4
+ tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
5
+
6
+ sequence = "In a hole in the ground there lived a hobbit."
7
+ res = tokenizer(sequence)
8
 
9
  def greet(name):
10
  return "Hello " + name + "!!"
11
 
12
+ iface = gr.Interface(fn=greet, inputs="text", outputs=res)
13
+ iface.launch()
14
+