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