Spaces:
Runtime error
Runtime error
Kushwanth Chowday Kandala
commited on
Commit
•
e496258
1
Parent(s):
d34a703
update promt
Browse files
app.py
CHANGED
@@ -26,10 +26,10 @@ import torch
|
|
26 |
|
27 |
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
28 |
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
|
34 |
model = SentenceTransformer("all-MiniLM-L6-v2", device=device)
|
35 |
st.divider()
|
|
|
26 |
|
27 |
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
28 |
|
29 |
+
if device != 'cuda':
|
30 |
+
st.markdown(f"you are using {device}. This is much slower than using "
|
31 |
+
"a CUDA-enabled GPU. If on colab you can change this by "
|
32 |
+
"clicking Runtime > change runtime type > GPU.")
|
33 |
|
34 |
model = SentenceTransformer("all-MiniLM-L6-v2", device=device)
|
35 |
st.divider()
|