Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -32,6 +32,22 @@ import fitz # PyMuPDF
|
|
| 32 |
from huggingface_hub import InferenceClient, HfApi, list_models
|
| 33 |
from huggingface_hub.utils import RepositoryNotFoundError, GatedRepoError # Import specific exceptions
|
| 34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
# Conditional imports for optional/heavy libraries
|
| 36 |
try:
|
| 37 |
import torch
|
|
@@ -92,19 +108,6 @@ DIFFUSION_MODELS_LIST = [
|
|
| 92 |
]
|
| 93 |
|
| 94 |
|
| 95 |
-
# --- App Configuration -----------------------------------
|
| 96 |
-
st.set_page_config(
|
| 97 |
-
page_title="Vision & Layout Titans (HF) ๐๐ผ๏ธ",
|
| 98 |
-
page_icon="๐ค",
|
| 99 |
-
layout="wide",
|
| 100 |
-
initial_sidebar_state="expanded",
|
| 101 |
-
menu_items={
|
| 102 |
-
'Get Help': 'https://huggingface.co/docs',
|
| 103 |
-
'Report a Bug': None, # Replace with your bug report link if desired
|
| 104 |
-
'About': "Combined App: Image->PDF Layout + Hugging Face Powered AI Tools ๐"
|
| 105 |
-
}
|
| 106 |
-
)
|
| 107 |
-
|
| 108 |
# --- Session State Initialization (Combined & Updated) ---
|
| 109 |
# Layout PDF specific
|
| 110 |
st.session_state.setdefault('layout_snapshots', [])
|
|
|
|
| 32 |
from huggingface_hub import InferenceClient, HfApi, list_models
|
| 33 |
from huggingface_hub.utils import RepositoryNotFoundError, GatedRepoError # Import specific exceptions
|
| 34 |
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
# --- App Configuration -----------------------------------
|
| 38 |
+
st.set_page_config(
|
| 39 |
+
page_title="Vision & Layout Titans (HF) ๐๐ผ๏ธ",
|
| 40 |
+
page_icon="๐ค",
|
| 41 |
+
layout="wide",
|
| 42 |
+
initial_sidebar_state="expanded",
|
| 43 |
+
menu_items={
|
| 44 |
+
'Get Help': 'https://huggingface.co/docs',
|
| 45 |
+
'Report a Bug': None, # Replace with your bug report link if desired
|
| 46 |
+
'About': "Combined App: Image->PDF Layout + Hugging Face Powered AI Tools ๐"
|
| 47 |
+
}
|
| 48 |
+
)
|
| 49 |
+
|
| 50 |
+
|
| 51 |
# Conditional imports for optional/heavy libraries
|
| 52 |
try:
|
| 53 |
import torch
|
|
|
|
| 108 |
]
|
| 109 |
|
| 110 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 111 |
# --- Session State Initialization (Combined & Updated) ---
|
| 112 |
# Layout PDF specific
|
| 113 |
st.session_state.setdefault('layout_snapshots', [])
|