Practica7 / app.py
mirari's picture
Update app.py
12d5d8b
raw
history blame
319 Bytes
from fastai.vision.all import *
import gradio as gr
learn = load_learner('export (1).pkl')
def predict(frase):
pred, pred_idx, probs = learn.predict(frase)
return {labels[i]: float(probs[i]) for i in range(len(labels))}
gr.Interface(fn=predict, examples=['frase1.txt','frase2.txt2']).launch(share=False)