Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
from transformers import
|
2 |
import gradio as gr
|
3 |
|
4 |
|
5 |
-
tokenizer =
|
6 |
|
7 |
def tokenize(input_text):
|
8 |
tokens = tokenizer(input_text)["input_ids"]
|
|
|
1 |
+
from transformers import GPT2Tokenizer
|
2 |
import gradio as gr
|
3 |
|
4 |
|
5 |
+
tokenizer = GPT2Tokenizer.from_pretrained("gpt2")
|
6 |
|
7 |
def tokenize(input_text):
|
8 |
tokens = tokenizer(input_text)["input_ids"]
|