Practica7 / app.py
mirari's picture
Update app.py
2c158de
raw
history blame
404 Bytes
from fastai.vision.all import *
import gradio as gr
learn = load_learner('export (1).pkl')
labels = learn.dls.vocab
def predict(frase):
pred, pred_idx, probs = learn.predict(frase)
return pred
gr.Interface(fn=predict, inputs="text", outputs="text", examples=['im feeling rather rotten so im not very ambitious right now','im updating my blog because i feel shitty
']).launch(share=False)