-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsnip_results.json
5 lines (5 loc) · 1.73 KB
/
snip_results.json
1
2
3
4
5
{
"2024-12-13 14:09:48": "\u00ae main.py > %& Menu > @ setup_ocr_tab\n\n206\n285\n295\n296\n297\n298\n299\n300\n301\n302\n303\n304\n305\n306\n307\n308\n309\n310\neseiets\n312\nohls}\n314\noul}\n316\n317\n318\n319\n320\n2edL\n\nclass Menu(Q!\n\ndef\n\ndef\n\n> About Aa ab, w* 4 of 11 TV\nsetup_ _ .\n\nlayout .addWidget (QLabel(\"Last Extracted Text:\"))\nself.extracted_text_label = QLabel(\"\")\nself.extracted_text_label.setWordWrap(True)\n\nself .extracted_text_label.setStyleSheet(\"background: #F@F@FO\nlayout .addWidget (self .extracted_text_label)\n\nmM\nx\n\n# Add loading spinner\n\nself.loading_label = QLabel(\"Processing OCR...\")\nself.loading_label.setAlignment(Qt.AlignCenter)\nself.loading_label.setStyleSheet(\"font-size: 16px; color: #6\nself.loading_label.hide()\n\n# Add copy latest text button\nself.copy_latest_button = QPushButton(\"Copy Latest Text\")\nself .copy_latest_button.clicked.connect(self.copy_latest_tex\n\n# Update layout to include new widgets\nlayout .addWidget (self. loading_label)\n\nlayout .addWidget (self.copy_latest_button)\nlayout .addWidget (self .extracted_text_label)\n\nself.ocr_tab.setLayout (layout)\n\nsetup_about_tab(self) :\n\nlayout = QVBoxLayout()\nabout_label = QLabel(\n\"OCR Snipping Tool\\n\"",
"2024-12-13 15:36:58": "",
"2024-12-13 15:40:21": "```python\ndef convert_to_pil_image(self, image: Union[np.ndarray, Image.Image]):\n \"\"\"Convert numpy array to PIL Image if necessary\"\"\"\n if isinstance(image, np.ndarray):\n return Image.fromarray(image)\n elif isinstance(image, Image.Image):\n return image\n else:\n raise ValueError(\"Input must be either a numpy array or PIL Image\")\n\ndef extract_text(self, image: Union[np.ndarray, Image.Image], lan\n```"
}