Dabs commited on
Commit
055c2b8
1 Parent(s): 20c923d

first commit

Browse files
Files changed (3) hide show
  1. .gitignore +1 -0
  2. app.py +17 -0
  3. requirements.txt +1 -0
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ venv/
app.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from pysentimiento import create_analyzer
2
+
3
+
4
+ import gradio as gr
5
+
6
+ analyzer = create_analyzer(task="sentiment", lang="es")
7
+
8
+ def sentiment_analysis(text):
9
+
10
+ sent = analyzer.predict(text).probas
11
+ return sent
12
+
13
+ iface = gr.Interface(sentiment_analysis, "textbox", "label", interpretation="default")
14
+
15
+ iface.test_launch()
16
+ if __name__ == "__main__":
17
+ iface.launch()
requirements.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ pysentimiento