mirror of
				https://github.com/allenai/olmocr.git
				synced 2025-10-29 17:05:18 +00:00 
			
		
		
		
	Fixing up some things with mine_html_templates
This commit is contained in:
		
							parent
							
								
									52c6dcd523
								
							
						
					
					
						commit
						a17aa6f94d
					
				| @ -344,7 +344,7 @@ async def generate_html_from_image(client, image_base64): | |||||||
|         # Step 1: Initial analysis and column detection |         # Step 1: Initial analysis and column detection | ||||||
|         analysis_response = await client.messages.create( |         analysis_response = await client.messages.create( | ||||||
|             model="claude-sonnet-4-5-20250929", |             model="claude-sonnet-4-5-20250929", | ||||||
|             max_tokens=4000, |             max_tokens=20000, | ||||||
|             temperature=0.1, |             temperature=0.1, | ||||||
|             messages=[ |             messages=[ | ||||||
|                 { |                 { | ||||||
| @ -383,7 +383,7 @@ async def generate_html_from_image(client, image_base64): | |||||||
|         # Step 2: Initial HTML generation with detailed layout instructions |         # Step 2: Initial HTML generation with detailed layout instructions | ||||||
|         initial_response = await client.messages.create( |         initial_response = await client.messages.create( | ||||||
|             model="claude-sonnet-4-5-20250929", |             model="claude-sonnet-4-5-20250929", | ||||||
|             max_tokens=12000, |             max_tokens=20000, | ||||||
|             temperature=0.2, |             temperature=0.2, | ||||||
|             messages=[ |             messages=[ | ||||||
|                 { |                 { | ||||||
| @ -457,7 +457,7 @@ async def generate_html_from_image(client, image_base64): | |||||||
|             # Step 4: Refinement - Show both images to Claude and ask for corrections |             # Step 4: Refinement - Show both images to Claude and ask for corrections | ||||||
|             refinement_response = await client.messages.create( |             refinement_response = await client.messages.create( | ||||||
|                 model="claude-sonnet-4-5-20250929", |                 model="claude-sonnet-4-5-20250929", | ||||||
|                 max_tokens=12000, |                 max_tokens=20000, | ||||||
|                 temperature=0.1, |                 temperature=0.1, | ||||||
|                 messages=[ |                 messages=[ | ||||||
|                     { |                     { | ||||||
| @ -477,6 +477,7 @@ async def generate_html_from_image(client, image_base64): | |||||||
|                                 "3. Spacing - are margins, padding, and spacing between elements correct?\n" |                                 "3. Spacing - are margins, padding, and spacing between elements correct?\n" | ||||||
|                                 "4. Occlusion - is any important content hidden or overlapping?\n" |                                 "4. Occlusion - is any important content hidden or overlapping?\n" | ||||||
|                                 "5. Text formatting - are fonts, sizes, and styles appropriate?\n" |                                 "5. Text formatting - are fonts, sizes, and styles appropriate?\n" | ||||||
|  |                                 "6. Tables - are the headers on tables are aligned with the correct corresponding columns?\n" | ||||||
|                                 f"The webpage will be viewed at {png_width}x{png_height} pixels.\n\n" |                                 f"The webpage will be viewed at {png_width}x{png_height} pixels.\n\n" | ||||||
|                                 "Provide a REVISED version of the HTML that corrects any issues you identified. " |                                 "Provide a REVISED version of the HTML that corrects any issues you identified. " | ||||||
|                                 "Make sure all important elements are visible and the layout matches the original as closely as possible.\n" |                                 "Make sure all important elements are visible and the layout matches the original as closely as possible.\n" | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Jake Poznanski
						Jake Poznanski