File size: 281 Bytes
83fd955
29fb26e
83fd955
29fb26e
83fd955
43de91e
 
 
 
 
83fd955
1
2
3
4
5
6
7
8
9
10
11
import gradio as gr
import transformers as tf 

model = tf.saved_model.load('..\arabert_pretrained')

def sentiment_analysis(text):
    prediction = model.predict(text)
    return prediction

iface = gr.Interface(fn=sentiment_analysis, inputs="text", outputs="text")
iface.launch()