AP_07 / app.py
Alesteba's picture
Update app.py
d2f871b
raw
history blame
563 Bytes
import gradio as gr
import tensorflow as tf
import numpy as np
from transformers import AutoModelForSequenceClassification
# model = AutoModelForSequenceClassification.from_pretrained("Alesteba/deep_model_07")
# from huggingface_hub import from_pretrained_keras
# model = from_pretrained_keras("Alesteba/deep_model_07")
from huggingface_hub import from_pretrained_fastai
learner = from_pretrained_fastai("Alesteba/deep_model_07")
def predict(prompt):
return model.predict(prompt)[0]
gr.Interface(fn=predict, inputs="text", outputs="text").launch()