File size: 342 Bytes
8231943
 
 
 
 
 
 
885bc42
adcdf2c
8231943
 
885bc42
1
2
3
4
5
6
7
8
9
10
11
12
13
import gradio as gr
from simplet5 import SimpleT5

model = SimpleT5()
# let's load the trained model for inferencing:
model.load_model("byt5","hantech/byt5_correct2", use_gpu=False)

def predict(text):
    result = model.predict('correct: '+text)
    return result[0]

gr.Interface(predict, [gr.Textbox(label="Text")], gr.Textbox()).launch()