openfree commited on
Commit
33aa4f8
ยท
verified ยท
1 Parent(s): a7df2d2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -16
app.py CHANGED
@@ -623,32 +623,36 @@ def generate_diagram_locally(json_data: str, diagram_type: str, output_format: s
623
  ##############################################################################
624
  # โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Prompt Templates (6 Styles) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
625
  EXAMPLE_PROMPTS: dict[str, str] = {
626
-
627
  "Product Design": (
628
- "A sleek industrial product-design sketch.\n"
629
- "{nodes}"
630
  ),
631
  "Mindmap": (
632
- "A hand-drawn colorful mind-map, educational style, clear hierarchy.\n"
633
- "{nodes}"
634
  ),
635
  "Mockup": (
636
- "A clean hand-drawn wire-frame for a mobile banking app.\n"
637
- "{nodes}"
638
  ),
639
  "Infographic": (
640
- "A flat corporate infographic โ€“ โ€œGlobal Renewable Energy Trends 2025โ€.\n"
641
- "{nodes}"
642
  ),
643
  "Diagram": (
644
- "A hand-drawn business process diagram.\n"
645
- "{nodes}"
646
  ),
647
  "Flowchart": (
648
- "A vibrant hand-drawn flow-chart.\n"
649
- "{nodes}"
650
  ),
651
  }
 
 
 
 
 
652
  STYLE_KEYS = list(EXAMPLE_PROMPTS.keys())
653
 
654
  def pick_flux_style(slide_idx: int) -> str:
@@ -691,9 +695,9 @@ def generate_flux_prompt(title: str, content: str, style_key: str) -> str:
691
 
692
  # 3) stylistic tail (โ‰ค120 words total)
693
  tail = (
694
- "Corporate palette, white background, hand-drawn line style, "
695
- "clean composition, high-resolution vector."
696
- )
697
 
698
  return f"{prompt_body}\n\n{tail}".strip()
699
 
 
623
  ##############################################################################
624
  # โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Prompt Templates (6 Styles) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
625
  EXAMPLE_PROMPTS: dict[str, str] = {
 
626
  "Product Design": (
627
+ "A sleek industrial product-design sketch showing the hierarchy below.\n"
628
+ "{tree}"
629
  ),
630
  "Mindmap": (
631
+ "A hand-drawn, colorful MIND-MAP of the following tree (central node on the left, radial branches).\n"
632
+ "{tree}"
633
  ),
634
  "Mockup": (
635
+ "A clean hand-drawn wire-frame mock-up โ€“ lay out the following screens/pages as boxes and arrows.\n"
636
+ "{tree}"
637
  ),
638
  "Infographic": (
639
+ "A flat CORPORATE INFOGRAPHIC that arranges each item below as its own icon + label.\n"
640
+ "{tree}"
641
  ),
642
  "Diagram": (
643
+ "A hand-drawn BUSINESS-PROCESS DIAGRAM. Use swim-lanes/boxes connected by arrows following the tree below.\n"
644
+ "{tree}"
645
  ),
646
  "Flowchart": (
647
+ "A vibrant hand-drawn FLOW-CHART. Use decision diamonds / process boxes exactly in this order:\n"
648
+ "{tree}"
649
  ),
650
  }
651
+
652
+
653
+
654
+
655
+
656
  STYLE_KEYS = list(EXAMPLE_PROMPTS.keys())
657
 
658
  def pick_flux_style(slide_idx: int) -> str:
 
695
 
696
  # 3) stylistic tail (โ‰ค120 words total)
697
  tail = (
698
+ "corporate colour palette, white background, hand-drawn line style; "
699
+ "boxes, arrows, connectors clearly visible; high-resolution vector."
700
+ )
701
 
702
  return f"{prompt_body}\n\n{tail}".strip()
703