Spaces:
Sleeping
Sleeping
johnoye742
commited on
Commit
•
f537c9e
1
Parent(s):
1483cd5
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
import gradio as gr
|
2 |
-
from transformers import
|
3 |
|
4 |
def greet(prompt):
|
5 |
-
|
6 |
|
7 |
-
return
|
8 |
|
9 |
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
10 |
iface.launch()
|
|
|
1 |
import gradio as gr
|
2 |
+
from transformers import AutoTokenizer
|
3 |
|
4 |
def greet(prompt):
|
5 |
+
tokenizer = AutoTokenizer.from_pretrained('bert-based-cased', return_tensors='tf')
|
6 |
|
7 |
+
return tokenizer(prompt)
|
8 |
|
9 |
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
10 |
iface.launch()
|