File size: 345 Bytes
83fd955
43de91e
83fd955
43de91e
83fd955
43de91e
 
 
 
 
83fd955
1
2
3
4
5
6
7
8
9
10
11
import gradio as gr
from transformers import AutoModelForSequenceClassification

model = AutoModelForSequenceClassification.from_pretrained('..\arabert_pretrained')

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

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