Update README.md
Browse files
README.md
CHANGED
@@ -1,16 +1,63 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
-
emoji:
|
4 |
colorFrom: yellow
|
5 |
colorTo: indigo
|
6 |
sdk: streamlit
|
7 |
-
sdk_version: 1.
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: mit
|
11 |
-
short_description: Torch Transformers Diffusion SFT
|
12 |
---
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
# TorchTransformers Diffusion CV SFT Titans ๐
|
15 |
|
16 |
A Streamlit app blending `torch`, `transformers`, and `diffusers` for vision and NLP fun! Snap PDFs ๐, turn them into double-page spreads ๐ผ๏ธ, extract text with GPT ๐ค, and craft emoji-packed Markdown outlines ๐โall with a witty UI and CPU-friendly SFT.
|
@@ -64,40 +111,6 @@ Run: `pip install -r requirements.txt`, `streamlit run app.py`. Snap, process, s
|
|
64 |
- ๐ผ๏ธ **Image Process**: OCR images with GPT vision.
|
65 |
- ๐ **MD Gallery**: Summarize Markdown files into emoji outlines.
|
66 |
|
67 |
-
## Tutorial: Single to Double Page Emoji Outlines
|
68 |
-
|
69 |
-
### Single Page Outline: Key Functions in `app.py`
|
70 |
-
|
71 |
-
| **Function** | **Purpose** ๐ฏ | **How It Works** ๐ ๏ธ | **Emoji Insight** ๐ |
|
72 |
-
|----------------------------|---------------------------------------------|--------------------------------------------------|-------------------------------|
|
73 |
-
| `generate_filename` | Unique file names ๐
| Adds timestamp to sequence | ๐ฐ๏ธ Timeโs your file buddy! |
|
74 |
-
| `pdf_url_to_filename` | Safe PDF names ๐๏ธ | Cleans URLs to underscores | ๐ซ No URL mess! |
|
75 |
-
| `get_download_link` | Downloadable files โฌ๏ธ | Base64-encodes for HTML links | ๐ฆ Grab it, go! |
|
76 |
-
| `download_pdf` | Web PDF snatcher ๐ | Fetches PDFs with `requests` | ๐ PDF pirate ahoy! |
|
77 |
-
| `process_pdf_snapshot` | PDF to images ๐ผ๏ธ | Async snapshots (single/double/all) with `fitz` | ๐ธ Double-page dazzle! |
|
78 |
-
| `process_ocr` | Image text extractor ๐ | Async GOT-OCR2_0 with `transformers` | ๐ Text ninja strikes! |
|
79 |
-
| `process_image_gen` | Prompt to image ๐จ | Async Stable Diffusion with `diffusers` | ๐๏ธ Art from wordsโbam! |
|
80 |
-
| `process_image_with_prompt`| GPT image analysis ๐ค | Base64 to GPT vision | ๐ง GPT sees all! |
|
81 |
-
| `process_text_with_prompt` | GPT text summarizer โ๏ธ | Text to GPT for outlining | ๐ Summarize like a pro! |
|
82 |
-
| `update_gallery` | File showcase ๐ผ๏ธ๐ | Sidebar display with delete options | ๐ Your creations shine! |
|
83 |
-
|
84 |
-
### Double Page Outline: Libraries in `requirements.txt`
|
85 |
-
|
86 |
-
| **Library** | **Single Page Purpose** ๐ฏ | **Double Page Usage** ๐ ๏ธ | **Emoji Insight** ๐ |
|
87 |
-
|---------------|-------------------------------------------|----------------------------------------------------|-------------------------------|
|
88 |
-
| `streamlit` | App UI ๐ | Tabs like โPDF Process ๐โ and โMD Gallery ๐โ | ๐ฌ App starโlights, action! |
|
89 |
-
| `pandas` | Data crunching ๐ | Ready for OCR/metadata tables | ๐ Table tamer awaits! |
|
90 |
-
| `torch` | ML engine ๐ฅ | Powers `transformers` and `diffusers` | ๐ฅ AIโs fiery heart! |
|
91 |
-
| `requests` | Web grabber ๐ | Downloads PDFs in `download_pdf` | ๐ Web loot collector! |
|
92 |
-
| `aiofiles` | Fast file ops โก | Async writes in `process_ocr` | โ๏ธ File speed demon! |
|
93 |
-
| `pillow` | Image magic ๐๏ธ | PDF to image in `process_pdf_snapshot` | ๐ผ๏ธ Pixel Picasso! |
|
94 |
-
| `PyMuPDF` | PDF handler ๐ | Snapshots in `process_pdf_snapshot` | ๐ PDF scroll master! |
|
95 |
-
| `transformers`| AI models ๐ฃ๏ธ | GOT-OCR2_0 in `process_ocr` | ๐ค Brain in a box! |
|
96 |
-
| `diffusers` | Image gen ๐จ | Stable Diffusion in `process_image_gen` | ๐จ Art generator supreme! |
|
97 |
-
| `openai` | GPT vision/text ๐ค | Image/text processing in GPT functions | ๐ All-seeing AI oracle! |
|
98 |
-
| `glob2` | File finder ๐ | Gallery files in `update_gallery` | ๐ต๏ธ File sleuth! |
|
99 |
-
| `pytz` | Time zones โฐ | Timestamps in `generate_filename` | โณ Time wizard! |
|
100 |
-
|
101 |
## Automation Instructions: Witty & Funny Steps ๐
|
102 |
|
103 |
1. **Load PDFs** ๐
|
@@ -169,4 +182,4 @@ Run: pip install -r requirements.txt, streamlit run app.py. Snap, process, outli
|
|
169 |
- View it in a Markdown renderer (e.g., GitHub, VS Code) to see tables and Mermaid diagram rendered.
|
170 |
- Follow the automation steps to process PDFs and generate outlinesโperfect for learners exploring AI vision and text summarization!
|
171 |
|
172 |
-
This README now serves as both a project overview and a tutorial, making it a fun, educational asset for all! ๐
|
|
|
1 |
---
|
2 |
+
title: ๐ง Torch ๐Transformers ๐ผ๏ธDiffusion CV ๐ง SFT
|
3 |
+
emoji: ๐ง ๐
|
4 |
colorFrom: yellow
|
5 |
colorTo: indigo
|
6 |
sdk: streamlit
|
7 |
+
sdk_version: 1.44.1
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: mit
|
11 |
+
short_description: ๐ทTorch ๐Transformers ๐ผ๏ธDiffusion CV ๐ง SFT
|
12 |
---
|
13 |
|
14 |
+
# Features:
|
15 |
+
1. Camera Snap ๐ท
|
16 |
+
2. Test OCR ๐
|
17 |
+
3. MD Gallery ๐
|
18 |
+
4. Download PDFs ๐ฅ
|
19 |
+
5. Build Titan ๐ฑ
|
20 |
+
6. Test Image Gen ๐จ
|
21 |
+
7. PDF Process ๐
|
22 |
+
8. Image Process ๐ผ๏ธ
|
23 |
+
9. Character Editor ๐งโ๐จ
|
24 |
+
10. Character Gallery ๐ผ๏ธ
|
25 |
+
|
26 |
+
## Tutorial: Single to Double Page Emoji Outlines
|
27 |
+
|
28 |
+
### Single Page Outline: Key Functions in `app.py`
|
29 |
+
|
30 |
+
| **Function** | **Purpose** ๐ฏ | **How It Works** ๐ ๏ธ | **Emoji Insight** ๐ |
|
31 |
+
|----------------------------|---------------------------------------------|--------------------------------------------------|-------------------------------|
|
32 |
+
| `generate_filename` | Unique file names ๐
| Adds timestamp to sequence | ๐ฐ๏ธ Timeโs your file buddy! |
|
33 |
+
| `pdf_url_to_filename` | Safe PDF names ๐๏ธ | Cleans URLs to underscores | ๐ซ No URL mess! |
|
34 |
+
| `get_download_link` | Downloadable files โฌ๏ธ | Base64-encodes for HTML links | ๐ฆ Grab it, go! |
|
35 |
+
| `download_pdf` | Web PDF snatcher ๐ | Fetches PDFs with `requests` | ๐ PDF pirate ahoy! |
|
36 |
+
| `process_pdf_snapshot` | PDF to images ๐ผ๏ธ | Async snapshots (single/double/all) with `fitz` | ๐ธ Double-page dazzle! |
|
37 |
+
| `process_ocr` | Image text extractor ๐ | Async GOT-OCR2_0 with `transformers` | ๐ Text ninja strikes! |
|
38 |
+
| `process_image_gen` | Prompt to image ๐จ | Async Stable Diffusion with `diffusers` | ๐๏ธ Art from wordsโbam! |
|
39 |
+
| `process_image_with_prompt`| GPT image analysis ๐ค | Base64 to GPT vision | ๐ง GPT sees all! |
|
40 |
+
| `process_text_with_prompt` | GPT text summarizer โ๏ธ | Text to GPT for outlining | ๐ Summarize like a pro! |
|
41 |
+
| `update_gallery` | File showcase ๐ผ๏ธ๐ | Sidebar display with delete options | ๐ Your creations shine! |
|
42 |
+
|
43 |
+
### Double Page Outline: Libraries in `requirements.txt`
|
44 |
+
|
45 |
+
| **Library** | **Single Page Purpose** ๐ฏ | **Double Page Usage** ๐ ๏ธ | **Emoji Insight** ๐ |
|
46 |
+
|---------------|-------------------------------------------|----------------------------------------------------|-------------------------------|
|
47 |
+
| `streamlit` | App UI ๐ | Tabs like โPDF Process ๐โ and โMD Gallery ๐โ | ๐ฌ App starโlights, action! |
|
48 |
+
| `pandas` | Data crunching ๐ | Ready for OCR/metadata tables | ๐ Table tamer awaits! |
|
49 |
+
| `torch` | ML engine ๐ฅ | Powers `transformers` and `diffusers` | ๐ฅ AIโs fiery heart! |
|
50 |
+
| `requests` | Web grabber ๐ | Downloads PDFs in `download_pdf` | ๐ Web loot collector! |
|
51 |
+
| `aiofiles` | Fast file ops โก | Async writes in `process_ocr` | โ๏ธ File speed demon! |
|
52 |
+
| `pillow` | Image magic ๐๏ธ | PDF to image in `process_pdf_snapshot` | ๐ผ๏ธ Pixel Picasso! |
|
53 |
+
| `PyMuPDF` | PDF handler ๐ | Snapshots in `process_pdf_snapshot` | ๐ PDF scroll master! |
|
54 |
+
| `transformers`| AI models ๐ฃ๏ธ | GOT-OCR2_0 in `process_ocr` | ๐ค Brain in a box! |
|
55 |
+
| `diffusers` | Image gen ๐จ | Stable Diffusion in `process_image_gen` | ๐จ Art generator supreme! |
|
56 |
+
| `openai` | GPT vision/text ๐ค | Image/text processing in GPT functions | ๐ All-seeing AI oracle! |
|
57 |
+
| `glob2` | File finder ๐ | Gallery files in `update_gallery` | ๐ต๏ธ File sleuth! |
|
58 |
+
| `pytz` | Time zones โฐ | Timestamps in `generate_filename` | โณ Time wizard! |
|
59 |
+
|
60 |
+
|
61 |
# TorchTransformers Diffusion CV SFT Titans ๐
|
62 |
|
63 |
A Streamlit app blending `torch`, `transformers`, and `diffusers` for vision and NLP fun! Snap PDFs ๐, turn them into double-page spreads ๐ผ๏ธ, extract text with GPT ๐ค, and craft emoji-packed Markdown outlines ๐โall with a witty UI and CPU-friendly SFT.
|
|
|
111 |
- ๐ผ๏ธ **Image Process**: OCR images with GPT vision.
|
112 |
- ๐ **MD Gallery**: Summarize Markdown files into emoji outlines.
|
113 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
## Automation Instructions: Witty & Funny Steps ๐
|
115 |
|
116 |
1. **Load PDFs** ๐
|
|
|
182 |
- View it in a Markdown renderer (e.g., GitHub, VS Code) to see tables and Mermaid diagram rendered.
|
183 |
- Follow the automation steps to process PDFs and generate outlinesโperfect for learners exploring AI vision and text summarization!
|
184 |
|
185 |
+
This README now serves as both a project overview and a tutorial, making it a fun, educational asset for all! ๐
|