Spaces:
Sleeping
Sleeping
File size: 469 Bytes
bb21314 f4d6740 bb21314 f4d6740 bb21314 98d296a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
import gradio as gr
import bap_preprocessing
def tokenize(data):
json_data = json.loads(data)
response = bap_preprocessing.tokenize(json_data['text'])
result = { "tokens": response }
return result
demo = gr.Interface(
fn=tokenize,
inputs="text",
outputs="text",
title="Tokenizer",
examples=[
"Ben oraya geliyorum.",
"Sen neden gelmiyorsun?"
]
)
demo.launch()
|