smartdigitalnetworks commited on
Commit
75c4ab3
·
verified ·
1 Parent(s): 3ec64ae

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -11
app.py CHANGED
@@ -1,12 +1,12 @@
1
- from transformers_js import import_transformers_js
2
- import gradio as gr
 
 
 
 
 
 
 
3
 
4
- transformers = await import_transformers_js()
5
- pipeline = transformers.pipeline
6
- pipe = await pipeline('sentiment-analysis')
7
-
8
- async def classify(text):
9
- return await pipe(text)
10
-
11
- demo = gr.Interface(classify, "textbox", "json")
12
- demo.launch()
 
1
+ from transformers_js import import_transformers_js
2
+ import gradio as gr
3
+
4
+ transformers = await import_transformers_js()
5
+ pipeline = transformers.pipeline
6
+ pipe = await pipeline('sentiment-analysis')
7
+
8
+ async def classify(text):
9
+ return await pipe(text)
10
 
11
+ demo = gr.Interface(classify, "textbox", "json")
12
+ demo.launch()