Update app.py
Browse filesStill need to fix -- "cuda:0"
app.py
CHANGED
|
@@ -82,7 +82,7 @@ fold_vocab = {
|
|
| 82 |
def predict(model_name, pairs_file, sequence_file, progress = gr.Progress()):
|
| 83 |
|
| 84 |
run_id = uuid4()
|
| 85 |
-
device = torch.device("0") if torch.cuda.is_available() else torch.device("cpu")
|
| 86 |
|
| 87 |
# gr.Info("Loading model...")
|
| 88 |
_ = lm_embed("M", use_cuda = (device.type == "cuda"))
|
|
|
|
| 82 |
def predict(model_name, pairs_file, sequence_file, progress = gr.Progress()):
|
| 83 |
|
| 84 |
run_id = uuid4()
|
| 85 |
+
device = torch.device("cuda:0") if torch.cuda.is_available() else torch.device("cpu")
|
| 86 |
|
| 87 |
# gr.Info("Loading model...")
|
| 88 |
_ = lm_embed("M", use_cuda = (device.type == "cuda"))
|