awacke1 commited on
Commit
f0e0407
ยท
verified ยท
1 Parent(s): 1f82ed4

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +52 -39
README.md CHANGED
@@ -1,16 +1,63 @@
1
  ---
2
- title: TorchTransformers Diffusion CV SFT
3
- emoji: โšก
4
  colorFrom: yellow
5
  colorTo: indigo
6
  sdk: streamlit
7
- sdk_version: 1.43.2
8
  app_file: app.py
9
  pinned: false
10
  license: mit
11
- short_description: Torch Transformers Diffusion SFT f. Streamlit & C. Vision
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! ๐Ÿš€