File size: 277 Bytes
fc80343
83fd955
fc80343
83fd955
79a930e
83fd955
43de91e
 
 
 
 
83fd955
1
2
3
4
5
6
7
8
9
10
11
12

import gradio as gr
import tensorflow 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()