nowaff commited on
Commit
4ad21ea
·
verified ·
1 Parent(s): 0d15e26

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -0
app.py CHANGED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from transformers import pipeline
3
+
4
+ pipe = pipeline("text-classification", model="CAMeL-Lab/bert-base-arabic-camelbert-mix-sentiment")
5
+
6
+ def analyze(text):
7
+ result = pipe(text)
8
+ return result
9
+
10
+ demo = gr.Interface(fn=analyze,
11
+ inputs="text",
12
+ outputs="text")
13
+
14
+ demo.launch(debug=True)