Spaces:
Running
Running
Felipe Meres
commited on
Commit
Β·
ce3fde5
1
Parent(s):
7436980
Remove false GPU advertising and fix misleading claims
Browse files- Remove false "free GPU acceleration" claims from README and app
- Update messaging to accurately reflect CPU-only processing on free tier
- Add honest performance expectations and upgrade path to GPU tier
- Fix device status messages to show "Free CPU Tier" accurately
- Add note about GPU tier upgrade for faster processing
- Replace misleading GPU benefits with honest CPU optimization claims
README.md
CHANGED
|
@@ -14,7 +14,7 @@ models:
|
|
| 14 |
|
| 15 |
# π¬ Granite Docling 258M - Online Demo
|
| 16 |
|
| 17 |
-
Experience IBM's cutting-edge Vision-Language Model for document processing and conversion directly in your browser
|
| 18 |
|
| 19 |
> **π€ This Space uses the [IBM Granite Docling 258M](https://huggingface.co/ibm-granite/granite-docling-258M) Vision-Language Model hosted on Hugging Face Hub**
|
| 20 |
|
|
@@ -59,17 +59,18 @@ The IBM Granite Docling 258M is a state-of-the-art Vision-Language Model (VLM) d
|
|
| 59 |
## β‘ Performance & Tips
|
| 60 |
|
| 61 |
- **Document Analysis mode** is optimized for speed and works great on the free tier
|
| 62 |
-
- **
|
| 63 |
- **Processing time varies** based on document size and complexity
|
| 64 |
-
- **Free tier**
|
|
|
|
| 65 |
|
| 66 |
## π οΈ Technical Details
|
| 67 |
|
| 68 |
- **Model**: [IBM Granite Docling 258M](https://huggingface.co/ibm-granite/granite-docling-258M) Vision-Language Model
|
| 69 |
- **Model Hub**: Automatically loaded from `ibm-granite/granite-docling-258M` on Hugging Face
|
| 70 |
- **Backend**: Docling framework with PyMuPDF optimization
|
| 71 |
-
- **GPU
|
| 72 |
-
- **Hosting**: π€ Hugging Face Spaces (Free Tier)
|
| 73 |
|
| 74 |
## π Links & Resources
|
| 75 |
|
|
|
|
| 14 |
|
| 15 |
# π¬ Granite Docling 258M - Online Demo
|
| 16 |
|
| 17 |
+
Experience IBM's cutting-edge Vision-Language Model for document processing and conversion directly in your browser on Hugging Face Spaces!
|
| 18 |
|
| 19 |
> **π€ This Space uses the [IBM Granite Docling 258M](https://huggingface.co/ibm-granite/granite-docling-258M) Vision-Language Model hosted on Hugging Face Hub**
|
| 20 |
|
|
|
|
| 59 |
## β‘ Performance & Tips
|
| 60 |
|
| 61 |
- **Document Analysis mode** is optimized for speed and works great on the free tier
|
| 62 |
+
- **CPU processing** optimized for reliable performance
|
| 63 |
- **Processing time varies** based on document size and complexity
|
| 64 |
+
- **Free CPU tier** provides reliable processing with timeout limitations for very large documents
|
| 65 |
+
- **Upgrade to GPU tier** for faster processing speeds
|
| 66 |
|
| 67 |
## π οΈ Technical Details
|
| 68 |
|
| 69 |
- **Model**: [IBM Granite Docling 258M](https://huggingface.co/ibm-granite/granite-docling-258M) Vision-Language Model
|
| 70 |
- **Model Hub**: Automatically loaded from `ibm-granite/granite-docling-258M` on Hugging Face
|
| 71 |
- **Backend**: Docling framework with PyMuPDF optimization
|
| 72 |
+
- **Processing**: CPU optimized (GPU available with paid tier upgrade)
|
| 73 |
+
- **Hosting**: π€ Hugging Face Spaces (Free CPU Tier)
|
| 74 |
|
| 75 |
## π Links & Resources
|
| 76 |
|
app.py
CHANGED
|
@@ -242,7 +242,7 @@ No table structures were detected in this document.
|
|
| 242 |
β‘ Mode: {processing_mode}
|
| 243 |
β±οΈ Processing time: {processing_time:.2f}s
|
| 244 |
π Content length: {len(markdown_output)} characters
|
| 245 |
-
π Running on Hugging Face Spaces"""
|
| 246 |
|
| 247 |
return markdown_output, json_metadata, processing_info, ""
|
| 248 |
|
|
@@ -309,26 +309,27 @@ No table structures were detected in this document.
|
|
| 309 |
<div class="main-header">
|
| 310 |
<h1>π¬ Granite Docling 258M - Online Demo</h1>
|
| 311 |
<p>Experience IBM's cutting-edge Vision-Language Model for document processing</p>
|
| 312 |
-
<p><strong>π Free
|
| 313 |
</div>
|
| 314 |
""")
|
| 315 |
|
| 316 |
# Demo info
|
| 317 |
-
device_status = "π» CPU Processing"
|
| 318 |
if self.granite_instance and hasattr(self.granite_instance, 'device'):
|
| 319 |
device = str(self.granite_instance.device)
|
| 320 |
if 'CUDA' in device:
|
| 321 |
-
device_status = "π GPU
|
| 322 |
elif 'MPS' in device:
|
| 323 |
-
device_status = "π Apple Silicon
|
| 324 |
|
| 325 |
demo_info = f"""
|
| 326 |
<div class="demo-box">
|
| 327 |
<h3>π Live Demo Status</h3>
|
| 328 |
-
<p><strong>Status</strong>: {"β
Ready" if DOCLING_AVAILABLE and self.granite_instance else "β οΈ Limited
|
| 329 |
<p><strong>Processing</strong>: {device_status}</p>
|
| 330 |
<p><strong>Model</strong>: <a href="https://huggingface.co/ibm-granite/granite-docling-258M" target="_blank" style="color: white; text-decoration: underline;">IBM Granite Docling 258M</a> Vision-Language Model</p>
|
| 331 |
-
<p><strong>Hosting</strong>: π€ Hugging Face Spaces (Free Tier)</p>
|
|
|
|
| 332 |
</div>
|
| 333 |
"""
|
| 334 |
gr.HTML(demo_info)
|
|
@@ -338,7 +339,7 @@ No table structures were detected in this document.
|
|
| 338 |
gr.HTML(f"""
|
| 339 |
<div style="background-color: #ffe6e6; padding: 15px; border-radius: 8px; margin: 10px 0; color: #d00;">
|
| 340 |
<h3>β οΈ Demo Limitations</h3>
|
| 341 |
-
<p>The full model might not be available on the free tier.
|
| 342 |
<p>For full functionality, clone the repository: <a href="https://github.com/felipemeres/granite-docling-implementation" target="_blank">GitHub Repository</a></p>
|
| 343 |
</div>
|
| 344 |
""")
|
|
@@ -422,7 +423,7 @@ No table structures were detected in this document.
|
|
| 422 |
<li><strong>Vision-Language Understanding</strong>: Advanced document comprehension</li>
|
| 423 |
<li><strong>Multi-Format Support</strong>: PDF, DOCX, Images</li>
|
| 424 |
<li><strong>Fast Analysis</strong>: 19x faster document insights</li>
|
| 425 |
-
<li><strong>
|
| 426 |
</ul>
|
| 427 |
</div>
|
| 428 |
""")
|
|
|
|
| 242 |
β‘ Mode: {processing_mode}
|
| 243 |
β±οΈ Processing time: {processing_time:.2f}s
|
| 244 |
π Content length: {len(markdown_output)} characters
|
| 245 |
+
π Running on Hugging Face Spaces (CPU tier)"""
|
| 246 |
|
| 247 |
return markdown_output, json_metadata, processing_info, ""
|
| 248 |
|
|
|
|
| 309 |
<div class="main-header">
|
| 310 |
<h1>π¬ Granite Docling 258M - Online Demo</h1>
|
| 311 |
<p>Experience IBM's cutting-edge Vision-Language Model for document processing</p>
|
| 312 |
+
<p><strong>π Free Document Processing on Hugging Face Spaces</strong></p>
|
| 313 |
</div>
|
| 314 |
""")
|
| 315 |
|
| 316 |
# Demo info
|
| 317 |
+
device_status = "π» CPU Processing (Free Tier)"
|
| 318 |
if self.granite_instance and hasattr(self.granite_instance, 'device'):
|
| 319 |
device = str(self.granite_instance.device)
|
| 320 |
if 'CUDA' in device:
|
| 321 |
+
device_status = "π GPU Processing (CUDA) - Paid Tier"
|
| 322 |
elif 'MPS' in device:
|
| 323 |
+
device_status = "π Apple Silicon Processing (MPS)"
|
| 324 |
|
| 325 |
demo_info = f"""
|
| 326 |
<div class="demo-box">
|
| 327 |
<h3>π Live Demo Status</h3>
|
| 328 |
+
<p><strong>Status</strong>: {"β
Ready" if DOCLING_AVAILABLE and self.granite_instance else "β οΈ Limited"}</p>
|
| 329 |
<p><strong>Processing</strong>: {device_status}</p>
|
| 330 |
<p><strong>Model</strong>: <a href="https://huggingface.co/ibm-granite/granite-docling-258M" target="_blank" style="color: white; text-decoration: underline;">IBM Granite Docling 258M</a> Vision-Language Model</p>
|
| 331 |
+
<p><strong>Hosting</strong>: π€ Hugging Face Spaces (Free CPU Tier)</p>
|
| 332 |
+
<p><strong>Note</strong>: Upgrade to GPU tier for faster processing</p>
|
| 333 |
</div>
|
| 334 |
"""
|
| 335 |
gr.HTML(demo_info)
|
|
|
|
| 339 |
gr.HTML(f"""
|
| 340 |
<div style="background-color: #ffe6e6; padding: 15px; border-radius: 8px; margin: 10px 0; color: #d00;">
|
| 341 |
<h3>β οΈ Demo Limitations</h3>
|
| 342 |
+
<p>The full model might not be available on the free CPU tier. Processing will be slower than GPU but still functional.</p>
|
| 343 |
<p>For full functionality, clone the repository: <a href="https://github.com/felipemeres/granite-docling-implementation" target="_blank">GitHub Repository</a></p>
|
| 344 |
</div>
|
| 345 |
""")
|
|
|
|
| 423 |
<li><strong>Vision-Language Understanding</strong>: Advanced document comprehension</li>
|
| 424 |
<li><strong>Multi-Format Support</strong>: PDF, DOCX, Images</li>
|
| 425 |
<li><strong>Fast Analysis</strong>: 19x faster document insights</li>
|
| 426 |
+
<li><strong>Reliable Processing</strong>: CPU-optimized on HF Spaces free tier</li>
|
| 427 |
</ul>
|
| 428 |
</div>
|
| 429 |
""")
|