Monke64 commited on
Commit
a1be0da
1 Parent(s): dc33e60

minor changes to app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -14,7 +14,7 @@ import torch
14
  physical_devices = tf.config.experimental.list_physical_devices('GPU')
15
  if len(physical_devices) > 0:
16
  tf.config.experimental.set_memory_growth(physical_devices[0], True)
17
- device = "cpu"
18
 
19
  @st.cache_resource
20
  def load_text_model():
 
14
  physical_devices = tf.config.experimental.list_physical_devices('GPU')
15
  if len(physical_devices) > 0:
16
  tf.config.experimental.set_memory_growth(physical_devices[0], True)
17
+ device = "cuda:0" if torch.cuda.is_available() else "cpu"
18
 
19
  @st.cache_resource
20
  def load_text_model():