staghado commited on
Commit
b7389c4
·
verified ·
1 Parent(s): 703d007

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +5 -3
README.md CHANGED
@@ -76,6 +76,8 @@ uv pip install -U vllm \
76
  --extra-index-url https://wheels.vllm.ai/nightly \
77
  --prerelease=allow
78
 
 
 
79
  uv pip install pypdfium2 pillow requests
80
  ```
81
 
@@ -105,8 +107,8 @@ pdf_data = requests.get(pdf_url).content
105
  # Open PDF and convert first page to image
106
  pdf = pdfium.PdfDocument(pdf_data)
107
  page = pdf[0]
108
- # Render at 300 DPI (scale factor = 300/72 ≈ 4.17)
109
- pil_image = page.render(scale=4.17).to_pil()
110
 
111
  # Convert to base64
112
  buffer = io.BytesIO()
@@ -123,7 +125,7 @@ payload = {
123
  "image_url": {"url": f"data:image/png;base64,{image_base64}"}
124
  }]
125
  }],
126
- "max_tokens": 6500,
127
  "temperature": 0.2,
128
  "top_p": 0.9,
129
  }
 
76
  --extra-index-url https://wheels.vllm.ai/nightly \
77
  --prerelease=allow
78
 
79
+ # if this fails try adding triton-kernels package
80
+ 'triton-kernels @ git+https://github.com/triton-lang/[email protected]#subdirectory=python/triton_kernels'
81
  uv pip install pypdfium2 pillow requests
82
  ```
83
 
 
107
  # Open PDF and convert first page to image
108
  pdf = pdfium.PdfDocument(pdf_data)
109
  page = pdf[0]
110
+ # Render at 200 DPI (scale factor = 200/72 ≈ 2.77)
111
+ pil_image = page.render(scale=2.77).to_pil()
112
 
113
  # Convert to base64
114
  buffer = io.BytesIO()
 
125
  "image_url": {"url": f"data:image/png;base64,{image_base64}"}
126
  }]
127
  }],
128
+ "max_tokens": 4096,
129
  "temperature": 0.2,
130
  "top_p": 0.9,
131
  }