from fastai.text.all import * | |
import pandas as pd | |
from datasets import load_dataset | |
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) |