Spaces:
Runtime error
Runtime error
Add application file
Browse files
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()
|