Manyue-DataScientist commited on
Commit
15b7502
·
verified ·
1 Parent(s): 3befa67

Update src/models/summarization.py

Browse files
Files changed (1) hide show
  1. src/models/summarization.py +0 -2
src/models/summarization.py CHANGED
@@ -21,8 +21,6 @@ class Summarizer:
21
  # Load the tokenizer
22
  self.tokenizer = BartTokenizer.from_pretrained("facebook/bart-base")
23
 
24
- # Move model to appropriate device (GPU if available)
25
- self.model.to(torch.device('cuda' if torch.cuda.is_available() else 'cpu'))
26
  return self.model
27
  except Exception as e:
28
  st.error(f"Error loading fine-tuned summarization model: {str(e)}")
 
21
  # Load the tokenizer
22
  self.tokenizer = BartTokenizer.from_pretrained("facebook/bart-base")
23
 
 
 
24
  return self.model
25
  except Exception as e:
26
  st.error(f"Error loading fine-tuned summarization model: {str(e)}")