Tanor commited on
Commit
684137a
·
1 Parent(s): f5e9dbc

Add application file

Browse files
Files changed (1) hide show
  1. app.py +9 -0
app.py ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from sentiwordnet_calculator import SentimentPipeline
3
+ pipe = SentimentPipeline("Tanor/SRGPTSENTPOS2", "Tanor/SRGPTSENTNEG2")
4
+
5
+ def calculate(text):
6
+ return pipe(text)
7
+
8
+ iface = gr.Interface(fn=calculate, inputs="text", outputs="text")
9
+ iface.launch()