byt5_correct / app.py
hantech's picture
Update app.py
1da4a5b
raw
history blame contribute delete
365 Bytes
import gradio as gr
from simplet5 import SimpleT5
model = SimpleT5()
# let's load the trained model for inferencing:
model.load_model("byt5","hantech/byt5_correct5", use_gpu=False)
def predict(text):
result = model.predict('correct: '+text)
print(str(result))
return result[0]
gr.Interface(predict, [gr.Textbox(label="Text")], gr.Textbox()).launch()