Yoshinoheart commited on
Commit
d09388b
1 Parent(s): bf87a38
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -10,8 +10,8 @@ args = TTSettings(num_beams=5, min_length=1)
10
  tokenizer = T5Tokenizer.from_pretrained("thaboe01/t5-spelling-corrector")
11
  model = T5ForConditionalGeneration.from_pretrained("thaboe01/t5-spelling-corrector")
12
 
13
- # Place the model on the appropriate device
14
- device = "cuda" if st.session_state.use_gpu else "cpu" # Use GPU if available, otherwise CPU
15
  model = model.to(device)
16
 
17
  # Function to split text into chunks
 
10
  tokenizer = T5Tokenizer.from_pretrained("thaboe01/t5-spelling-corrector")
11
  model = T5ForConditionalGeneration.from_pretrained("thaboe01/t5-spelling-corrector")
12
 
13
+ # Ensure the model is on the CPU
14
+ device = "cpu"
15
  model = model.to(device)
16
 
17
  # Function to split text into chunks