Spaces:
Sleeping
Sleeping
chris-iturri
commited on
Commit
·
85cbf6c
1
Parent(s):
a412ffc
Add application file
Browse files
app.py
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
import gradio as gr
|
3 |
+
from transformers import pipeline
|
4 |
+
|
5 |
+
def sentiment_fn(sentences):
|
6 |
+
model = pipeline("sentiment-analysis", model="panyqueso/my-cool-model")
|
7 |
+
return model(sentences)
|
8 |
+
|
9 |
+
demo = gr.Interface(fn=sentiment_fn, inputs="textbox", outputs="textbox")
|
10 |
+
|
11 |
+
demo.launch(share=True)
|