sahilnishad commited on
Commit
e435685
1 Parent(s): 771dd88

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -7,8 +7,8 @@ import torch
7
 
8
  # Load the model and processor
9
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
10
- model = AutoModelForCausalLM.from_pretrained("sahilnishad/Florence-2-FT-DocVQA").to(device)
11
- processor = AutoProcessor.from_pretrained("sahilnishad/Florence-2-FT-DocVQA")
12
 
13
  # Function to run inference
14
  def get_answer(task_prompt, question, image):
 
7
 
8
  # Load the model and processor
9
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
10
+ model = AutoModelForCausalLM.from_pretrained("sahilnishad/Florence-2-FT-DocVQA", trust_remote_code=True).to(device)
11
+ processor = AutoProcessor.from_pretrained("sahilnishad/Florence-2-FT-DocVQA", trust_remote_code=True)
12
 
13
  # Function to run inference
14
  def get_answer(task_prompt, question, image):