sahilnishad commited on
Commit
206dfba
1 Parent(s): a639bf4

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -4
README.md CHANGED
@@ -26,17 +26,17 @@ Fine-tuned Florence-2 model on DocumentVQA dataset to perform question answering
26
  # Get Started with the Model
27
 
28
  #### 1. Installation
29
-
30
  ```python
31
- pip install torch transformers datasets flash_attn
32
  ```
 
33
  #### 2. Loading model and processor
34
  ```python
35
  import torch
36
  from transformers import AutoModelForCausalLM, AutoProcessor
37
 
38
- model = AutoModelForCausalLM.from_pretrained("sahilnishad/Florence-2-FT-DocVQA")
39
- processor = AutoProcessor.from_pretrained("sahilnishad/Florence-2-FT-DocVQA")
40
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
41
  model.to(device)
42
  ```
 
26
  # Get Started with the Model
27
 
28
  #### 1. Installation
 
29
  ```python
30
+ !pip install torch transformers datasets flash_attn
31
  ```
32
+
33
  #### 2. Loading model and processor
34
  ```python
35
  import torch
36
  from transformers import AutoModelForCausalLM, AutoProcessor
37
 
38
+ model = AutoModelForCausalLM.from_pretrained("sahilnishad/Florence-2-FT-DocVQA", trust_remote_code=True)
39
+ processor = AutoProcessor.from_pretrained("sahilnishad/Florence-2-FT-DocVQA", trust_remote_code=True)
40
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
41
  model.to(device)
42
  ```