Spaces:
Sleeping
Sleeping
Commit
·
6aa1eb0
1
Parent(s):
d615911
fix bug
Browse files
app.py
CHANGED
@@ -6,8 +6,8 @@ device = 0 if torch.cuda.is_available() else -1
|
|
6 |
|
7 |
sentiment_pipeline = pipeline("sentiment-analysis", device=device)
|
8 |
|
9 |
-
|
10 |
-
return
|
11 |
|
12 |
demo = gr.Interface(fn=process, inputs="text", outputs="json")
|
13 |
|
|
|
6 |
|
7 |
sentiment_pipeline = pipeline("sentiment-analysis", device=device)
|
8 |
|
9 |
+
def process(text):
|
10 |
+
return sentiment_pipeline(text)
|
11 |
|
12 |
demo = gr.Interface(fn=process, inputs="text", outputs="json")
|
13 |
|