Update app.py
Browse files
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/
|
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)
|