Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -145,7 +145,7 @@ A young woman named Elara, known for her kindness and bravery, was chosen. She a
|
|
145 |
|
146 |
# --- UI & File Handling ---
|
147 |
FILE_ICONS = defaultdict(lambda: 'โ', {
|
148 |
-
'.md': '
|
149 |
'.png': '๐ผ๏ธ', '.jpg': '๐ผ๏ธ', '.jpeg': '๐ผ๏ธ', '.gif': '๐ผ๏ธ', '.bmp': '๐ผ๏ธ', '.tiff': '๐ผ๏ธ',
|
150 |
'.pdf': '๐'
|
151 |
})
|
@@ -422,7 +422,7 @@ with gr.Blocks(theme=get_theme(), title="The PDF Alchemist") as demo:
|
|
422 |
ai_content_output = gr.Textbox(label="Golem's Manuscript (Editable)", lines=10, interactive=True, value="# The Golem awaits your command!\n\n")
|
423 |
gr.Markdown("<hr style='border-color: #374151; margin-top: 20px; margin-bottom: 20px;'>")
|
424 |
gr.Markdown("### ๐ค Add Your Physical Treasures")
|
425 |
-
uploaded_files = gr.File(label="Upload Files (TXT, MD, Code, Images, PDFs)", file_count="multiple", file_types=['text', 'image', '.pdf', '.py', '.js', '.html', '.css', '.json'])
|
426 |
|
427 |
with gr.Accordion("๐ Arcane Blueprints (Layout & Structure)", open=True):
|
428 |
selected_layouts = gr.CheckboxGroup(choices=list(LAYOUTS.keys()), label="Page Layouts", value=["A4 Portrait"])
|
@@ -478,4 +478,4 @@ with gr.Blocks(theme=get_theme(), title="The PDF Alchemist") as demo:
|
|
478 |
if __name__ == "__main__":
|
479 |
if not EMOJI_FONT_PATH:
|
480 |
print("\n" + "="*80 + "\nCRITICAL WARNING: 'NotoColorEmoji-Regular.ttf' not found.\nThe application will fail to generate PDFs with color emojis.\n" + "="*80 + "\n")
|
481 |
-
demo.launch(debug=True)
|
|
|
145 |
|
146 |
# --- UI & File Handling ---
|
147 |
FILE_ICONS = defaultdict(lambda: 'โ', {
|
148 |
+
'.md': '๏ฟฝ', '.txt': '๐', '.py': '๐', '.js': 'โก', '.html': '๐', '.css': '๐จ', '.json': '๐ฎ',
|
149 |
'.png': '๐ผ๏ธ', '.jpg': '๐ผ๏ธ', '.jpeg': '๐ผ๏ธ', '.gif': '๐ผ๏ธ', '.bmp': '๐ผ๏ธ', '.tiff': '๐ผ๏ธ',
|
150 |
'.pdf': '๐'
|
151 |
})
|
|
|
422 |
ai_content_output = gr.Textbox(label="Golem's Manuscript (Editable)", lines=10, interactive=True, value="# The Golem awaits your command!\n\n")
|
423 |
gr.Markdown("<hr style='border-color: #374151; margin-top: 20px; margin-bottom: 20px;'>")
|
424 |
gr.Markdown("### ๐ค Add Your Physical Treasures")
|
425 |
+
uploaded_files = gr.File(label="Upload Files (TXT, MD, Code, Images, PDFs)", file_count="multiple", file_types=['text', '.md', 'image', '.pdf', '.py', '.js', '.html', '.css', '.json'])
|
426 |
|
427 |
with gr.Accordion("๐ Arcane Blueprints (Layout & Structure)", open=True):
|
428 |
selected_layouts = gr.CheckboxGroup(choices=list(LAYOUTS.keys()), label="Page Layouts", value=["A4 Portrait"])
|
|
|
478 |
if __name__ == "__main__":
|
479 |
if not EMOJI_FONT_PATH:
|
480 |
print("\n" + "="*80 + "\nCRITICAL WARNING: 'NotoColorEmoji-Regular.ttf' not found.\nThe application will fail to generate PDFs with color emojis.\n" + "="*80 + "\n")
|
481 |
+
demo.launch(debug=True)
|