MaybeAhmad commited on
Commit
4691155
·
verified ·
1 Parent(s): fd15b90

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -0
app.py CHANGED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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, inputs='text', outputs='text)
11
+ demo.launch(debug=true)
12
+
13
+