Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -1,16 +1,16 @@
|
|
1 |
import streamlit as st
|
2 |
import gc
|
3 |
from collections import defaultdict
|
4 |
-
|
5 |
from transformers import pipeline
|
6 |
from lingua import Language, LanguageDetectorBuilder
|
7 |
|
8 |
__version__ = "0.1.0"
|
9 |
|
10 |
-
if torch.cuda.is_available():
|
11 |
-
device_tag = 0 # first gpu
|
12 |
-
else:
|
13 |
-
device_tag = -1 # cpu
|
14 |
|
15 |
default_models = {
|
16 |
Language.ENGLISH: "lxyuan/distilbert-base-multilingual-cased-sentiments-student",
|
|
|
1 |
import streamlit as st
|
2 |
import gc
|
3 |
from collections import defaultdict
|
4 |
+
|
5 |
from transformers import pipeline
|
6 |
from lingua import Language, LanguageDetectorBuilder
|
7 |
|
8 |
__version__ = "0.1.0"
|
9 |
|
10 |
+
#if torch.cuda.is_available():
|
11 |
+
# device_tag = 0 # first gpu
|
12 |
+
#else:
|
13 |
+
#device_tag = -1 # cpu
|
14 |
|
15 |
default_models = {
|
16 |
Language.ENGLISH: "lxyuan/distilbert-base-multilingual-cased-sentiments-student",
|