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()