jcsagar commited on
Commit
de198e7
·
verified ·
1 Parent(s): 074e4c9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -4,8 +4,10 @@ from PIL import Image
4
  import torch
5
  import os
6
 
 
 
7
  # Load the model
8
- model = AutoModel.from_pretrained("jcsagar/CXR-LLAVA-v2", trust_remote_code=True)
9
  model = model.to("cuda" if torch.cuda.is_available() else "cpu")
10
 
11
  # Define the function to generate the report
 
4
  import torch
5
  import os
6
 
7
+ MODEL_ACCESS_TOKEN = os.getenv('MODEL_ACCESS_TOKEN')
8
+
9
  # Load the model
10
+ model = AutoModel.from_pretrained("jcsagar/CXR-LLAVA-v2", trust_remote_code=True, token=MODEL_ACCESS_TOKEN)
11
  model = model.to("cuda" if torch.cuda.is_available() else "cpu")
12
 
13
  # Define the function to generate the report