Sanket17 commited on
Commit
fed4460
·
verified ·
1 Parent(s): d865512

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -19,12 +19,12 @@ class OmniParser:
19
  self.device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
20
  # Initialize processor and model
21
  self.processor = AutoProcessor.from_pretrained(
22
- "microsoft/OmniParser",
23
  trust_remote_code=True,
24
  cache_dir="/code/.cache"
25
  )
26
  self.model = AutoModelForVisualQuestionAnswering.from_pretrained(
27
- "microsoft/OmniParser",
28
  trust_remote_code=True,
29
  cache_dir="/code/.cache"
30
  ).to(self.device)
 
19
  self.device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
20
  # Initialize processor and model
21
  self.processor = AutoProcessor.from_pretrained(
22
+ "microsoft/Florence-2-base",
23
  trust_remote_code=True,
24
  cache_dir="/code/.cache"
25
  )
26
  self.model = AutoModelForVisualQuestionAnswering.from_pretrained(
27
+ "microsoft/OmniParser/icon_caption_florence",
28
  trust_remote_code=True,
29
  cache_dir="/code/.cache"
30
  ).to(self.device)