Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -105,11 +105,7 @@ def greet(text):
|
|
105 |
x = import_module('models.' + model_name)
|
106 |
|
107 |
config = x.Config(dataset, embedding)
|
108 |
-
device=(
|
109 |
-
"cuda"
|
110 |
-
if torch.cuda.is_available()
|
111 |
-
else "cpu"
|
112 |
-
)
|
113 |
model = models.TextCNN.Model(config)
|
114 |
|
115 |
# vocab, train_data, dev_data, test_data = build_dataset(config, args.word)
|
|
|
105 |
x = import_module('models.' + model_name)
|
106 |
|
107 |
config = x.Config(dataset, embedding)
|
108 |
+
device=("cuda" if torch.cuda.is_available() else "cpu")
|
|
|
|
|
|
|
|
|
109 |
model = models.TextCNN.Model(config)
|
110 |
|
111 |
# vocab, train_data, dev_data, test_data = build_dataset(config, args.word)
|