Spaces:
Sleeping
Sleeping
Commit
·
a4a7478
1
Parent(s):
2effb35
change model
Browse files- app.py +3 -3
- requirements.txt +0 -1
app.py
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
import gradio as gr
|
2 |
-
from
|
3 |
|
4 |
-
|
5 |
|
6 |
async def process(text):
|
7 |
-
return await
|
8 |
|
9 |
demo = gr.Interface(fn=process, inputs="text", outputs="json")
|
10 |
|
|
|
1 |
import gradio as gr
|
2 |
+
from transformers import pipeline
|
3 |
|
4 |
+
sentiment_pipeline = pipeline("sentiment-analysis")
|
5 |
|
6 |
async def process(text):
|
7 |
+
return await sentiment_pipeline(text)
|
8 |
|
9 |
demo = gr.Interface(fn=process, inputs="text", outputs="json")
|
10 |
|
requirements.txt
CHANGED
@@ -1 +0,0 @@
|
|
1 |
-
transformers_js_py
|
|
|
|