Practica7 / app.py
mirari's picture
Update app.py
d33ca2a
raw
history blame
456 Bytes
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)