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 | |
model = from_pretrained_fastai("Alesteba/deep_model_07") | |
def predict(prompt): | |
return model.predict(prompt)[0] | |
gr.Interface(fn=predict, inputs="text", outputs="text").launch() | |