ginipick's picture
Update README.md
73668fa verified
metadata
title: FLUX Text Tree Prompt - Mindmap Generator
emoji: ๐Ÿ–ผ
colorFrom: purple
colorTo: red
sdk: gradio
sdk_version: 5.35.0
app_file: app.py
pinned: false

Looking at this code, it's a FLUX Text-Tree Image Generator that creates hand-drawn style mind map diagrams using AI. Let me provide explanations in both English and Korean.

English Explanation

This is a Gradio application that uses the FLUX.1-schnell diffusion model to generate hand-drawn style mind map diagrams from text prompts. Here's how it works:

Key Features:

  1. Model: Uses FLUX.1-schnell from Black Forest Labs, a fast diffusion model optimized for quick generation
  2. Interface: Split-screen layout with input controls on the left and examples on the right
  3. Functionality: Converts structured text descriptions into visual mind map diagrams

Main Components:

  • Text Input: Users enter hierarchical text structures using tree-like formatting (โ”œโ”€โ”€, โ”‚, โ””โ”€โ”€)
  • Image Generation: Creates 1024x1024 images by default with customizable dimensions
  • Examples: 10 pre-made examples covering topics like Knowledge Tree, Digital Transformation, Creative Process, etc.
  • Advanced Settings: Control seed, randomization, image dimensions, and inference steps

Technical Details:

  • Uses bfloat16 precision for efficient GPU memory usage
  • Implements the @spaces.GPU() decorator for Hugging Face Spaces GPU allocation
  • Fast generation with only 4 inference steps by default
  • Custom CSS for an attractive, professional interface

How to Use:

  1. Enter a hierarchical text prompt describing your mind map structure
  2. Click "Generate Diagram" or use one of the example templates
  3. Adjust advanced settings if needed (seed, dimensions, steps)
  4. The AI will generate a colorful, hand-drawn style diagram based on your input

ํ•œ๊ธ€ ์„ค๋ช…

์ด ์ฝ”๋“œ๋Š” FLUX.1-schnell ํ™•์‚ฐ ๋ชจ๋ธ์„ ์‚ฌ์šฉํ•˜์—ฌ ํ…์ŠคํŠธ ํ”„๋กฌํ”„ํŠธ๋กœ๋ถ€ํ„ฐ ์†์œผ๋กœ ๊ทธ๋ฆฐ ์Šคํƒ€์ผ์˜ ๋งˆ์ธ๋“œ๋งต ๋‹ค์ด์–ด๊ทธ๋žจ์„ ์ƒ์„ฑํ•˜๋Š” Gradio ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์ž…๋‹ˆ๋‹ค.

์ฃผ์š” ๊ธฐ๋Šฅ:

  1. ๋ชจ๋ธ: Black Forest Labs์˜ FLUX.1-schnell ์‚ฌ์šฉ - ๋น ๋ฅธ ์ƒ์„ฑ์— ์ตœ์ ํ™”๋œ ํ™•์‚ฐ ๋ชจ๋ธ
  2. ์ธํ„ฐํŽ˜์ด์Šค: ์™ผ์ชฝ์— ์ž…๋ ฅ ์ปจํŠธ๋กค, ์˜ค๋ฅธ์ชฝ์— ์˜ˆ์ œ๊ฐ€ ์žˆ๋Š” ๋ถ„ํ•  ํ™”๋ฉด ๋ ˆ์ด์•„์›ƒ
  3. ๊ธฐ๋Šฅ: ๊ตฌ์กฐํ™”๋œ ํ…์ŠคํŠธ ์„ค๋ช…์„ ์‹œ๊ฐ์  ๋งˆ์ธ๋“œ๋งต ๋‹ค์ด์–ด๊ทธ๋žจ์œผ๋กœ ๋ณ€ํ™˜

์ฃผ์š” ๊ตฌ์„ฑ ์š”์†Œ:

  • ํ…์ŠคํŠธ ์ž…๋ ฅ: ์‚ฌ์šฉ์ž๊ฐ€ ํŠธ๋ฆฌ ํ˜•์‹(โ”œโ”€โ”€, โ”‚, โ””โ”€โ”€)์„ ์‚ฌ์šฉํ•˜์—ฌ ๊ณ„์ธต์  ํ…์ŠคํŠธ ๊ตฌ์กฐ ์ž…๋ ฅ
  • ์ด๋ฏธ์ง€ ์ƒ์„ฑ: ๊ธฐ๋ณธ 1024x1024 ์ด๋ฏธ์ง€ ์ƒ์„ฑ, ํฌ๊ธฐ ์กฐ์ • ๊ฐ€๋Šฅ
  • ์˜ˆ์ œ: ์ง€์‹ ํŠธ๋ฆฌ, ๋””์ง€ํ„ธ ์ „ํ™˜, ์ฐฝ์˜์  ๊ณผ์ • ๋“ฑ 10๊ฐœ์˜ ์‚ฌ์ „ ์ œ์ž‘๋œ ์˜ˆ์ œ ์ œ๊ณต
  • ๊ณ ๊ธ‰ ์„ค์ •: ์‹œ๋“œ, ๋ฌด์ž‘์œ„ํ™”, ์ด๋ฏธ์ง€ ํฌ๊ธฐ, ์ถ”๋ก  ๋‹จ๊ณ„ ์ œ์–ด

๊ธฐ์ˆ ์  ์„ธ๋ถ€์‚ฌํ•ญ:

  • ํšจ์œจ์ ์ธ GPU ๋ฉ”๋ชจ๋ฆฌ ์‚ฌ์šฉ์„ ์œ„ํ•ด bfloat16 ์ •๋ฐ€๋„ ์‚ฌ์šฉ
  • Hugging Face Spaces GPU ํ• ๋‹น์„ ์œ„ํ•œ @spaces.GPU() ๋ฐ์ฝ”๋ ˆ์ดํ„ฐ ๊ตฌํ˜„
  • ๊ธฐ๋ณธ 4๋‹จ๊ณ„์˜ ์ถ”๋ก ์œผ๋กœ ๋น ๋ฅธ ์ƒ์„ฑ ๊ฐ€๋Šฅ
  • ๋งค๋ ฅ์ ์ด๊ณ  ์ „๋ฌธ์ ์ธ ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ์œ„ํ•œ ์ปค์Šคํ…€ CSS

์‚ฌ์šฉ ๋ฐฉ๋ฒ•:

  1. ๋งˆ์ธ๋“œ๋งต ๊ตฌ์กฐ๋ฅผ ์„ค๋ช…ํ•˜๋Š” ๊ณ„์ธต์  ํ…์ŠคํŠธ ํ”„๋กฌํ”„ํŠธ ์ž…๋ ฅ
  2. "Generate Diagram" ํด๋ฆญ ๋˜๋Š” ์˜ˆ์ œ ํ…œํ”Œ๋ฆฟ ์ค‘ ํ•˜๋‚˜ ์‚ฌ์šฉ
  3. ํ•„์š”์‹œ ๊ณ ๊ธ‰ ์„ค์ • ์กฐ์ • (์‹œ๋“œ, ํฌ๊ธฐ, ๋‹จ๊ณ„)
  4. AI๊ฐ€ ์ž…๋ ฅ์— ๊ธฐ๋ฐ˜ํ•˜์—ฌ ๋‹ค์ฑ„๋กญ๊ณ  ์†์œผ๋กœ ๊ทธ๋ฆฐ ์Šคํƒ€์ผ์˜ ๋‹ค์ด์–ด๊ทธ๋žจ ์ƒ์„ฑ

์˜ˆ์ œ ์ฃผ์ œ:

  • ์ง€์‹ ํŠธ๋ฆฌ (Knowledge Tree)
  • ๋””์ง€ํ„ธ ์ „ํ™˜ (Digital Transformation)
  • ์ฐฝ์˜์  ๊ณผ์ • (Creative Process)
  • ๋ฏธ๋ž˜ ๋„์‹œ (Future Cities)
  • ๊ฑด๊ฐ• ์ง„ํ™” (Health Evolution)
  • ์šฐ์ฃผ ํƒ์‚ฌ (Space Exploration)
  • ํ•ด์–‘ ํ˜์‹  (Ocean Innovation)
  • ์–‘์ž ์ปดํ“จํŒ… (Quantum Computing)
  • ๋ฐ”์ด์˜ค ์—”์ง€๋‹ˆ์–ด๋ง (Bio Engineering)
  • AI ์ง„ํ™” (AI Evolution)

์ด ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์€ ๋ณต์žกํ•œ ๊ฐœ๋…์„ ์‹œ๊ฐ์ ์œผ๋กœ ํ‘œํ˜„ํ•˜๊ณ ์ž ํ•˜๋Š” ๊ต์œก์ž, ํ”„๋ ˆ์  ํ„ฐ, ์ฝ˜ํ…์ธ  ํฌ๋ฆฌ์—์ดํ„ฐ์—๊ฒŒ ํŠนํžˆ ์œ ์šฉํ•ฉ๋‹ˆ๋‹ค.