winain7788 commited on
Commit
a4a7478
·
1 Parent(s): 2effb35

change model

Browse files
Files changed (2) hide show
  1. app.py +3 -3
  2. requirements.txt +0 -1
app.py CHANGED
@@ -1,10 +1,10 @@
1
  import gradio as gr
2
- from transformers_js_py import pipeline
3
 
4
- pipe = pipeline('sentiment-analysis')
5
 
6
  async def process(text):
7
- return await pipe(text)
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