File size: 448 Bytes
cc2931f
2eee280
 
cc2931f
e7c29ce
 
e708535
e7c29ce
2eee280
 
e7c29ce
2eee280
b30773e
2eee280
e7c29ce
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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")

def predict(prompt):
    return model.predict(prompt)[0]
    
gr.Interface(fn=predict, inputs="text", outputs="text").launch()