Spaces:
Build error
Build error
Remove a debugging statement
Browse files
app.py
CHANGED
|
@@ -155,10 +155,6 @@ class GlobalData:
|
|
| 155 |
def from_pretrained(cls, model_name):
|
| 156 |
logger.info(f'Loading pretrained model: {model_name}')
|
| 157 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
| 158 |
-
if torch.cuda.is_available():
|
| 159 |
-
st.write('CUDA is available')
|
| 160 |
-
else:
|
| 161 |
-
st.write('CUDA not available')
|
| 162 |
config, model, tokenizer = ct.load_pretrained(model_name)
|
| 163 |
model.to(device)
|
| 164 |
embeddings = ct.get_embeddings(model, config)
|
|
|
|
| 155 |
def from_pretrained(cls, model_name):
|
| 156 |
logger.info(f'Loading pretrained model: {model_name}')
|
| 157 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
|
|
|
|
|
|
|
|
|
|
|
|
| 158 |
config, model, tokenizer = ct.load_pretrained(model_name)
|
| 159 |
model.to(device)
|
| 160 |
embeddings = ct.get_embeddings(model, config)
|