sourabhbargi11 commited on
Commit
82b37de
·
verified ·
1 Parent(s): 5f69d7b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -23,7 +23,7 @@ def set_page_config():
23
  )
24
 
25
  def initialize_model():
26
- device = 'cuda' if torch.cuda.is_available() else 'cpu'
27
  # load a fine-tuned image captioning model and corresponding tokenizer and image processor
28
  model = AutoModel.from_pretrained("sourabhbargi11/Caption_generator_model").to(device)
29
  tokenizer = AutoTokenizer.from_pretrained("sourabhbargi11/Caption_generator_model")
 
23
  )
24
 
25
  def initialize_model():
26
+ device = 'cpu'
27
  # load a fine-tuned image captioning model and corresponding tokenizer and image processor
28
  model = AutoModel.from_pretrained("sourabhbargi11/Caption_generator_model").to(device)
29
  tokenizer = AutoTokenizer.from_pretrained("sourabhbargi11/Caption_generator_model")