Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,11 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
|
3 |
-
|
4 |
-
return "Hello " + sinda + "!!"
|
5 |
|
6 |
-
|
|
|
|
|
|
|
|
|
7 |
iface.launch()
|
|
|
1 |
import gradio as gr
|
2 |
+
from transformers import AutoModelForSequenceClassification
|
3 |
|
4 |
+
model = AutoModelForSequenceClassification.from_pretrained('..\arabert_pretrained')
|
|
|
5 |
|
6 |
+
def sentiment_analysis(text):
|
7 |
+
prediction = model.predict(text)
|
8 |
+
return prediction
|
9 |
+
|
10 |
+
iface = gr.Interface(fn=sentiment_analysis, inputs="text", outputs="text")
|
11 |
iface.launch()
|