aelius commited on
Commit
d9bc917
1 Parent(s): ad1c907

prompt updates

Browse files
Files changed (1) hide show
  1. app.py +90 -72
app.py CHANGED
@@ -14,9 +14,9 @@ def on_button_click():
14
 
15
 
16
  modalities = [
17
- "COMPUTED TOMOGRAPHY (CT) scan", "DIGITAL BREAST TOMOSYNTHESIS image", "DIGITAL MAMMOGRAPHY imge",
18
- "MAGNETIC RESONANCE IMAGING (MRI) scan", "MICRO-CT scan", "PET-CT scan",
19
- "POSITRON EMISSION TOMOGRAPHY (PET) scan", "RADIOGRAPHY image", "ULTRASONOGRAPHY image"
20
  ]
21
 
22
  modalities = [i.lower() for i in modalities]
@@ -45,75 +45,93 @@ organ = st.selectbox('Organ', organs, index=None)
45
  modality = st.selectbox('Modality', modalities, index=None)
46
  style = st.selectbox('Style', artists, index=None)
47
 
48
- # artist_prompts = {
49
- # 'Leonardo da Vinci': f"A detailed {organ} {modality} in the intricate and detailed style of Leonardo da Vinci's anatomical drawings. The {modality} should show the {organ} structure with medical precision, combining scientific accuracy with Renaissance artistry.",
50
- # 'Vincent van Gogh': f"A detailed {organ} {modality} in the style of Van Gogh, with the swirling, vibrant colors and bold brushstrokes characteristic of his paintings. The {modality} should show the {organ} structure with medical precision, set against a background reminiscent of 'Starry Night.'",
51
- # 'Pablo Picasso': f"A detailed {organ} {modality} depicted in the abstract and fragmented style of Pablo Picasso's Cubism. The {modality} should show the {organ} structure with medical precision, using geometric shapes and bold lines.",
52
- # 'Claude Monet': f"A detailed {organ} {modality} in the impressionistic and soft-focus style of Claude Monet. The {modality} should show the {organ} structure with medical precision, using delicate brushstrokes and a subtle color palette.",
53
- # 'Rembrandt': f"A detailed {organ} {modality} rendered in the dramatic and richly textured style of Rembrandt. The {modality} should show the {organ} structure with medical precision, using deep shadows and warm highlights.",
54
- # 'Michelangelo': f"A detailed {organ} {modality} sculpted in the grand and dynamic style of Michelangelo. The {modality} should show the {organ} structure with medical precision, emphasizing intricate details and a sense of movement.",
55
- # 'Raphael': f"A detailed {organ} {modality} in the harmonious and balanced style of Raphael. The {modality} should show the {organ} structure with medical precision, using clear lines and soft colors.",
56
- # 'Henri Matisse': f"A detailed {organ} {modality} in the vibrant and expressive style of Henri Matisse. The {modality} should show the {organ} structure with medical precision, using bold colors and fluid lines.",
57
- # 'Paul Cezanne': f"A detailed {organ} {modality} in the structured and methodical style of Paul Cezanne. The {modality} should show the {organ} structure with medical precision, using carefully arranged shapes and a harmonious color palette.",
58
- # 'Gustav Klimt': f"A detailed {organ} {modality} in the ornate and decorative style of Gustav Klimt. The {modality} should show the {organ} structure with medical precision, using intricate patterns, gold leaf, and symbolic elements.",
59
- # 'Jackson Pollock': f"A detailed {organ} {modality} in the chaotic and energetic style of Jackson Pollock's action painting. The {modality} should show the {organ} structure with medical precision, using splatters and drips of paint.",
60
- # 'Edgar Degas': f"A detailed {organ} {modality} in the graceful and observational style of Edgar Degas. The {modality} should show the {organ} structure with medical precision, using delicate lines and soft pastels.",
61
- # 'Francisco Goya': f"A detailed {organ} {modality} in the dark and dramatic style of Francisco Goya. The {modality} should show the {organ} structure with medical precision, using stark contrasts and a haunting atmosphere.",
62
- # 'Edouard Manet': f"A detailed {organ} {modality} in the bold and modern style of Edouard Manet. The {modality} should show the {organ} structure with medical precision, using strong contrasts and a focus on contemporary realism.",
63
- # 'Andy Warhol': f"A detailed {organ} {modality} in the pop art style of Andy Warhol. The {modality} should show the {organ} structure with medical precision, using bright colors, repetitive patterns, and a playful, commercial aesthetic.",
64
- # 'Salvador Dal铆': f"A detailed {organ} {modality} in the surreal and dreamlike style of Salvador Dal铆. The {modality} should show the {organ} structure with medical precision, incorporating fantastical elements and imaginative twists.",
65
- # 'Wassily Kandinsky': f"A detailed {organ} {modality} in the abstract and colorful style of Wassily Kandinsky. The {modality} should show the {organ} structure with medical precision, using vibrant hues and geometric shapes.",
66
- # 'Paul Gauguin': f"A detailed {organ} {modality} in the exotic and symbolic style of Paul Gauguin. The {modality} should show the {organ} structure with medical precision, using rich colors and simplified forms.",
67
- # 'Joan Mir贸': f"A detailed {organ} {modality} in the playful and abstract style of Joan Mir贸. The {modality} should show the {organ} structure with medical precision, using whimsical shapes and bright colors.",
68
- # 'Georges Seurat': f"A detailed {organ} {modality} in the pointillist style of Georges Seurat. The {modality} should show the {organ} structure with medical precision, using tiny dots of color meticulously arranged.",
69
- # '脡douard Vuillard': f"A detailed {organ} {modality} in the intimate and decorative style of 脡douard Vuillard. The {modality} should show the {organ} structure with medical precision, using soft colors and intricate patterns.",
70
- # 'Marc Chagall': f"A detailed {organ} {modality} in the dreamlike and fantastical style of Marc Chagall. The {modality} should show the {organ} structure with medical precision, using floating figures and vivid colors.",
71
- # 'Kazimir Malevich': f"A detailed {organ} {modality} in the minimalist and geometric style of Kazimir Malevich. The {modality} should show the {organ} structure with medical precision, using simple shapes and pure colors.",
72
- # 'Piet Mondrian': f"A detailed {organ} {modality} in the neoplasticist style of Piet Mondrian. The {modality} should show the {organ} structure with medical precision, using a grid of black lines and primary colors.",
73
- # 'Jean-Michel Basquiat': f"A detailed {organ} {modality} in the raw and expressive style of Jean-Michel Basquiat. The {modality} should show the {organ} structure with medical precision, using bold lines and graffiti-like elements.",
74
- # 'Frida Kahlo': f"A detailed {organ} {modality} in the deeply personal and symbolic style of Frida Kahlo. The {modality} should show the {organ} structure with medical precision, using vivid colors and emotional intensity.",
75
- # 'Artemisia Gentileschi': f"A detailed {organ} {modality} in the dramatic and powerful style of Artemisia Gentileschi. The {modality} should show the {organ} structure with medical precision, using strong contrasts and dynamic composition.",
76
- # 'Caravaggio': f"A detailed {organ} {modality} in the intense and chiaroscuro style of Caravaggio. The {modality} should show the {organ} structure with medical precision, using stark lighting and dramatic shadows.",
77
- # 'El Greco': f"A detailed {organ} {modality} in the elongated and expressive style of El Greco. The {modality} should show the {organ} structure with medical precision, using distorted forms and vibrant colors.",
78
- # 'Eug猫ne Delacroix': f"A detailed {organ} {modality} in the romantic and dynamic style of Eug猫ne Delacroix. The {modality} should show the {organ} structure with medical precision, using bold colors and energetic brushstrokes.",
79
- # 'J.M.W. Turner': f"A detailed {organ} {modality} in the atmospheric and luminous style of J.M.W. Turner. The {modality} should show the {organ} structure with medical precision, using soft, swirling colors and a sense of light and movement."
80
- # }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
 
82
  artist_prompts = {
83
- "Leonardo da Vinci": f"""High-resolution {modality} of the {organ} with clear anatomy, rendered in Leonardo da Vinci's style with meticulous detail, soft shading, and realistic proportions on a parchment-like background (optional: focus on {organ} only, black background).""",
84
- "Vincent van Gogh": f"""High-resolution {modality} of the {organ} with clear anatomy, rendered in Van Gogh's style with thick swirling brushstrokes and vibrant colors (blues, yellows, greens) on a textured canvas (optional: focus on {organ} only, black background, slight glow).""",
85
- "Pablo Picasso": f"""High-resolution {modality} of the {organ} with a cubist style inspired by Pablo Picasso, featuring fragmented and geometric shapes with a limited color palette (optional: focus on {organ} only, black background).""",
86
- "Claude Monet": f"""High-resolution {modality} of the {organ} with a subtle, impressionistic style inspired by Claude Monet, featuring soft brushstrokes and blurred details with a focus on light and color (optional: focus on {organ} only, muted background).""",
87
- "Rembrandt": f"""High-resolution {modality} of the {organ} with a chiaroscuro style inspired by Rembrandt, featuring dramatic lighting, deep shadows, and rich details (optional: focus on {organ} only, dark background).""",
88
- "Michelangelo": f"""High-resolution {modality} of the {organ} with a detailed anatomical style inspired by Michelangelo, emphasizing musculature and form with a focus on realism (optional: focus on {organ} only, light background).""",
89
- "Raphael": f"""High-resolution {modality} of the {organ} with a harmonious and balanced style inspired by Raphael, featuring idealized proportions and soft lighting (optional: focus on {organ} only, muted background).""",
90
- "Henri Matisse": f"""High-resolution {modality} of the {organ} with a bold and colorful style inspired by Henri Matisse, featuring flat shapes and simplified forms (optional: focus on {organ} only, contrasting background).""",
91
- "Paul Cezanne": f"""High-resolution {modality} of the {organ} with a geometric and structured style inspired by Paul Cezanne, featuring geometric shapes and overlapping planes (optional: focus on {organ} only, muted background).""",
92
- "Gustav Klimt": f"""High-resolution {modality} of the {organ} with an ornamental and decorative style inspired by Gustav Klimt, featuring intricate patterns and gold accents (optional: focus on {organ} only, dark background).""",
93
- "Jackson Pollock": f"""High-resolution {modality} of the {organ} with an abstract expressionist style inspired by Jackson Pollock, featuring energetic gestures and dripped paint (optional: focus on {organ} only, contrasting background).""",
94
- "Edgar Degas": f"""High-resolution {modality} of the {organ} with a realistic and dynamic style inspired by Edgar Degas, focusing on movement and anatomy (optional: focus on {organ} in action, muted background).""",
95
- "Francisco Goya": f"""High-resolution {modality} of the {organ} with a dark and dramatic style inspired by Francisco Goya, featuring strong contrasts and expressive brushstrokes (optional: focus on {organ} only, dark background).""",
96
- "Edouard Manet": f"""High-resolution {modality} of the {organ} with a realistic and observational style inspired by Edouard Manet, focusing on light and shadow (optional: focus on {organ} only, muted background).""",
97
- "Andy Warhol": f"""High-resolution {modality} of the {organ} with a pop art style inspired by Andy Warhol, featuring bold colors and repeated patterns (optional: focus on {organ} only, contrasting background).""",
98
- "Salvador Dal铆": f"""High-resolution {modality} of the {organ} with a surrealist style inspired by Salvador Dal铆, featuring dreamlike imagery and distorted perspectives (optional: focus on {organ} only, dreamlike background).""",
99
- "Wassily Kandinsky": f"""High-resolution {modality} of the {organ} with an abstract style inspired by Wassily Kandinsky, featuring vibrant colors, geometric shapes, and dynamic compositions (optional: emphasize lines and circles, focus on {organ} only, black background).""",
100
- "Paul Gauguin": f"""High-resolution {modality} of the {organ} with a post-impressionist style inspired by Paul Gauguin, featuring bold colors, flat shapes, and exotic imagery (optional: focus on {organ} only, patterned background).""",
101
- "Joan Mir贸": f"""High-resolution {modality} of the {organ} with a whimsical and playful style inspired by Joan Mir贸, featuring biomorphic shapes, vibrant colors, and childlike wonder (optional: focus on {organ} only, bright background).""",
102
- "Georges Seurat": f"""High-resolution {modality} of the {organ} with a pointillist style inspired by Georges Seurat, featuring small dots of color that create a cohesive image when viewed from afar (optional: focus on {organ} only, muted background).""",
103
- "脡douard Vuillard": f"""High-resolution {modality} of the {organ} with an intimate and decorative style inspired by 脡douard Vuillard, featuring muted colors, flat patterns, and domestic scenes (optional: focus on {organ} only, patterned background).""",
104
- "Marc Chagall": f"""High-resolution {modality} of the {organ} with a dreamlike and poetic style inspired by Marc Chagall, featuring floating figures, vibrant colors, and symbolic imagery (optional: focus on {organ} only, dreamlike background).""",
105
- "Kazimir Malevich": f"""High-resolution {modality} of the {organ} with a suprematist style inspired by Kazimir Malevich, featuring geometric shapes (squares, circles, lines) in a limited color palette (optional: focus on {organ} only, black background).""",
106
- "Piet Mondrian": f"""High-resolution {modality} of the {organ} with a neoplasticism style inspired by Piet Mondrian, featuring black lines, rectangular shapes, and primary colors (optional: focus on {organ} only, white background).""",
107
- "Jean-Michel Basquiat": f"""High-resolution {modality} of the {organ} with a neo-expressionist style inspired by Jean-Michel Basquiat, featuring bold colors, raw energy, and symbolic imagery with text (optional: focus on {organ} only, contrasting background).""",
108
- "Frida Kahlo": f"""High-resolution {modality} of the {organ} with a surrealist and self-portrait style inspired by Frida Kahlo, featuring bold colors, symbolic elements, and an exploration of identity (optional: focus on {organ} only, contrasting background).""",
109
- "Artemisia Gentileschi": f"""High-resolution {modality} of the {organ} with a dramatic and chiaroscuro style inspired by Artemisia Gentileschi, featuring strong lighting, emotional expression, and realistic anatomy (optional: focus on {organ} only, dark background).""",
110
- "Caravaggio": f"""High-resolution {modality} of the {organ} with a tenebrist style inspired by Caravaggio, featuring dramatic lighting, deep shadows, and intense realism (optional: focus on {organ} only, dark background).""",
111
- "El Greco": f"""High-resolution {modality} of the {organ} with a mannerist style inspired by El Greco, featuring elongated figures, dramatic lighting, and emotional intensity (optional: focus on {organ} only, muted background).""",
112
- "Eug猫ne Delacroix": f"""High-resolution {modality} of the {organ} with a romantic style inspired by Eug猫ne Delacroix, featuring movement, passionate expression, and dramatic lighting (optional: focus on {organ} in action, contrasting background).""",
113
- "J.M.W. Turner": f"""High-resolution {modality} of the {organ} with a romantic and atmospheric style inspired by J.M.W. Turner, featuring light and shadow effects, dramatic landscapes, and a sense of movement (optional: focus on {organ} only, swirling background)."""
114
  }
115
 
116
 
 
 
 
117
 
118
  prompt_lst = [organ, modality, style]
119
 
@@ -130,14 +148,14 @@ if st.session_state.button_clicked:
130
  with st.spinner('Processing...'):
131
  print(prompt_lst)
132
 
133
- prompt = artist_prompts[style]
134
  print(prompt)
135
- pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16, variant="fp16")
136
- pipe.to("cuda")
137
 
138
- image = pipe(prompt=prompt).images[0]
139
 
140
- st.image(image)
141
 
142
  st.session_state.button_disabled = False
143
 
 
14
 
15
 
16
  modalities = [
17
+ "COMPUTED TOMOGRAPHY (CT)", "DIGITAL BREAST TOMOSYNTHESIS", "DIGITAL MAMMOGRAPHY",
18
+ "MAGNETIC RESONANCE IMAGING (MRI)", "MICRO-CT", "PET-CT",
19
+ "POSITRON EMISSION TOMOGRAPHY (PET)", "RADIOGRAPHY", "ULTRASONOGRAPHY"
20
  ]
21
 
22
  modalities = [i.lower() for i in modalities]
 
45
  modality = st.selectbox('Modality', modalities, index=None)
46
  style = st.selectbox('Style', artists, index=None)
47
 
48
+ image_descriptions = {
49
+ "COMPUTED TOMOGRAPHY (CT)": "a high-resolution cross-sectional image created by computed tomography (CT), capturing detailed structures of the",
50
+ "DIGITAL BREAST TOMOSYNTHESIS": "a detailed 3D image generated by digital breast tomosynthesis, providing high-definition visualization of the",
51
+ "DIGITAL MAMMOGRAPHY": "a clear, high-contrast image produced by digital mammography, highlighting the fine details and textures of the",
52
+ "MAGNETIC RESONANCE IMAGING (MRI)": "a detailed, high-contrast magnetic resonance imaging (MRI) scan, providing in-depth visualization of the",
53
+ "MICRO-CT": "a high-resolution micro-CT scan, capturing the minute structural details of the",
54
+ "PET-CT": "a combined positron emission tomography-computed tomography (PET-CT) scan, offering both metabolic and anatomical information of the",
55
+ "POSITRON EMISSION TOMOGRAPHY (PET)": "a detailed positron emission tomography (PET) scan, highlighting the metabolic and functional aspects of the",
56
+ "RADIOGRAPHY": "a sharp, high-contrast radiography (X-ray) image, providing clear visualization of the",
57
+ "ULTRASONOGRAPHY": "a detailed ultrasonography image, capturing the soft tissue structures of the"
58
+ }
59
+
60
+ # Descriptions for each organ
61
+ organ_descriptions = {
62
+ "ANUS": "an anatomically precise depiction of the anus, focusing on detailed musculature and surrounding tissues",
63
+ "AORTA": "a highly detailed image of the aorta, capturing the intricate structure of the main artery and its branches",
64
+ "BLADDER": "a clear representation of the bladder, emphasizing the detailed structure of the organ and its surrounding tissues",
65
+ "BONE": "an accurate image of the bone, showcasing its detailed structure, including cortical and trabecular patterns",
66
+ "BRAIN": "a detailed visualization of the brain, highlighting its complex structures and intricate neural networks",
67
+ "BREAST": "a precise image of the breast, focusing on its detailed anatomy and internal structures",
68
+ "CERVIX": "a detailed depiction of the cervix, capturing its unique anatomical features and surrounding tissues",
69
+ "CHEST": "a clear representation of the chest, showcasing the detailed anatomy of the thoracic cavity",
70
+ "COLON": "an accurate image of the colon, emphasizing its detailed structure and surrounding tissues",
71
+ "CORONARY HEART": "a precise visualization of the coronary heart, highlighting the intricate structure of the coronary arteries and heart muscles",
72
+ "EAR": "a detailed image of the ear, focusing on the complex anatomy of the outer, middle, and inner ear",
73
+ "ENDOMETRIUM": "an accurate depiction of the endometrium, highlighting the detailed layers of the uterine lining",
74
+ "ESOPHAGUS": "a clear representation of the esophagus, emphasizing its detailed structure and surrounding tissues",
75
+ "HEAD AND NECK": "a detailed visualization of the head and neck, showcasing the complex anatomical structures and tissues",
76
+ "KIDNEY": "a precise image of the kidney, focusing on its detailed internal structure and surrounding tissues",
77
+ "LIVER": "an accurate depiction of the liver, highlighting its detailed lobes and internal structures",
78
+ "LUNG": "a clear representation of the lung, showcasing the detailed anatomy of the respiratory organ",
79
+ "LYMPH NODE": "a detailed image of the lymph node, emphasizing its unique anatomical features and surrounding tissues",
80
+ "OVARY": "an accurate depiction of the ovary, highlighting its detailed internal structures and surrounding tissues",
81
+ "PANCREAS": "a clear image of the pancreas, showcasing its detailed structure and surrounding tissues",
82
+ "PELVIS": "a precise representation of the pelvis, focusing on its detailed bone structure and surrounding tissues",
83
+ "PERIPHERAL ARTERIAL": "a detailed depiction of the peripheral arterial system, highlighting its intricate vascular structures",
84
+ "PHANTOM": "a detailed representation of a phantom, focusing on its simulated anatomical features for medical imaging purposes",
85
+ "PROSTATE": "an accurate image of the prostate, emphasizing its detailed structure and surrounding tissues",
86
+ "RECTUM": "a precise depiction of the rectum, highlighting its detailed anatomy and surrounding tissues",
87
+ "SOFT TISSUES": "a clear representation of the soft tissues, showcasing the detailed anatomy and intricate structures",
88
+ "UTERUS": "an accurate image of the uterus, emphasizing its detailed structure and surrounding tissues"
89
+ }
90
+
91
+ if organ != None:
92
+ organ_description = organ_descriptions[organ.upper()]
93
+ if modality != None:
94
+ image_description = image_descriptions[modality.upper()]
95
+
96
 
97
  artist_prompts = {
98
+ "Leonardo da Vinci": f"Generate a highly detailed and anatomically accurate {{image_description}} {{organ_description}} in the style of Leonardo da Vinci. Emphasize intricate anatomical details, precision, and a Renaissance aesthetic with detailed sketches and cross-hatching, akin to da Vinci's anatomical drawings.",
99
+ "Vincent van Gogh": f"Create a {{image_description}} {{organ_description}} that is both medically accurate and stylistically reminiscent of Vincent van Gogh. Incorporate bold, expressive brushstrokes, vibrant colors, and swirling patterns that reflect van Gogh's emotional intensity and post-impressionist style.",
100
+ "Pablo Picasso": f"Produce an accurate {{image_description}} {{organ_description}}, infused with the distinctive style of Pablo Picasso. Use cubist elements, fragmented forms, and abstract shapes to reinterpret the anatomical structure while maintaining medical accuracy.",
101
+ "Claude Monet": f"Generate a {{image_description}} {{organ_description}} that combines medical precision with the impressionistic style of Claude Monet. Use soft, diffused colors and light, with a focus on blending and capturing the essence of the organ through light and shadow.",
102
+ "Rembrandt": f"Create a {{image_description}} {{organ_description}} that reflects the Baroque style of Rembrandt. Emphasize dramatic lighting, deep contrasts, and a rich, textured appearance, with a focus on detailed anatomy and chiaroscuro effects.",
103
+ "Michelangelo": f"Produce a {{image_description}} {{organ_description}} in the style of Michelangelo. Emphasize anatomical perfection, muscular detail, and a sculptural quality reminiscent of Michelangelo's work, with a Renaissance grandeur and precision.",
104
+ "Raphael": f"Generate an anatomically accurate {{image_description}} {{organ_description}} with the refined elegance of Raphael. Use harmonious compositions, balanced proportions, and delicate, clear lines, reflecting the High Renaissance style.",
105
+ "Henri Matisse": f"Create a {{image_description}} {{organ_description}} that blends medical accuracy with Henri Matisse's vibrant, Fauvist style. Use bold, flat colors, simplified forms, and a sense of dynamic movement to convey the anatomical structure.",
106
+ "Paul Cezanne": f"Produce a {{image_description}} {{organ_description}} inspired by Paul Cezanne. Emphasize geometric simplification, structured forms, and a painterly approach with visible brushstrokes that convey depth and volume.",
107
+ "Gustav Klimt": f"Generate a {{image_description}} {{organ_description}} in the opulent style of Gustav Klimt. Incorporate intricate patterns, gold leaf effects, and a decorative, almost mosaic-like quality, while ensuring anatomical accuracy.",
108
+ "Jackson Pollock": f"Create a {{image_description}} {{organ_description}} with the dynamic, abstract expressionist style of Jackson Pollock. Use energetic splatters, drips, and layered colors to create an abstract yet medically precise representation.",
109
+ "Edgar Degas": f"Produce an anatomically accurate {{image_description}} {{organ_description}} in the style of Edgar Degas. Use soft pastels, delicate lines, and a focus on capturing the subtle nuances and movement within the organ's structure.",
110
+ "Francisco Goya": f"Generate a {{image_description}} {{organ_description}} reflecting the dramatic and dark style of Francisco Goya. Emphasize strong contrasts, intense emotion, and a somewhat somber tone, while maintaining medical accuracy.",
111
+ "Edouard Manet": f"Create a {{image_description}} {{organ_description}} with the modern, impressionistic style of Edouard Manet. Use loose brushstrokes, a focus on light and shadow, and a slightly realist approach to anatomical detail.",
112
+ "Andy Warhol": f"Produce an accurate {{image_description}} {{organ_description}} in the pop art style of Andy Warhol. Use bright, bold colors, repetitive patterns, and a graphic, almost commercial aesthetic to present the anatomical structure.",
113
+ "Salvador Dal铆": f"Generate a {{image_description}} {{organ_description}} with the surreal, dreamlike quality of Salvador Dal铆. Incorporate unexpected elements, distorted forms, and a sense of fantastical realism, while ensuring anatomical precision.",
114
+ "Wassily Kandinsky": f"Create a {{image_description}} {{organ_description}} in the abstract, expressionist style of Wassily Kandinsky. Use vibrant colors, geometric shapes, and a sense of rhythmic composition to depict the organ's structure.",
115
+ "Paul Gauguin": f"Produce a {{image_description}} {{organ_description}} inspired by Paul Gauguin's post-impressionist style. Use bold, flat areas of color, strong outlines, and a somewhat primitive, symbolic approach to represent the anatomy.",
116
+ "Joan Mir贸": f"Generate a {{image_description}} {{organ_description}} with the whimsical, abstract style of Joan Mir贸. Use playful shapes, bright colors, and a surreal, childlike quality, while maintaining accurate anatomical representation.",
117
+ "Georges Seurat": f"Create an accurate {{image_description}} {{organ_description}} in the pointillist style of Georges Seurat. Use tiny dots of color to build up the image, focusing on light and color interactions to depict the anatomical details.",
118
+ "脡douard Vuillard": f"Produce a {{image_description}} {{organ_description}} with the intimate, decorative style of 脡douard Vuillard. Use soft colors, intricate patterns, and a focus on texture and detail, ensuring medical accuracy.",
119
+ "Marc Chagall": f"Generate a {{image_description}} {{organ_description}} inspired by Marc Chagall's dreamlike, expressionist style. Use rich, vibrant colors, fantastical elements, and a poetic, almost narrative quality to depict the anatomy.",
120
+ "Kazimir Malevich": f"Create an accurate {{image_description}} {{organ_description}} in the suprematist style of Kazimir Malevich. Use geometric shapes, abstract forms, and a minimalist approach, while ensuring clear anatomical representation.",
121
+ "Piet Mondrian": f"Produce a {{image_description}} {{organ_description}} in the neoplasticism style of Piet Mondrian. Use clean lines, primary colors, and a grid-like composition to present the anatomical structure with precise accuracy.",
122
+ "Jean-Michel Basquiat": f"Generate a {{image_description}} {{organ_description}} in the raw, expressive style of Jean-Michel Basquiat. Use bold lines, graffiti-like elements, and a chaotic yet powerful composition to depict the anatomy.",
123
+ "Frida Kahlo": f"Create an anatomically accurate {{image_description}} {{organ_description}} with the emotive, surreal style of Frida Kahlo. Use rich colors, symbolic elements, and a deeply personal, almost autobiographical approach to represent the organ.",
124
+ "Artemisia Gentileschi": f"Produce a {{image_description}} {{organ_description}} in the dramatic Baroque style of Artemisia Gentileschi. Emphasize strong contrasts, rich colors, and detailed anatomy, with a focus on powerful, emotional representation.",
125
+ "Caravaggio": f"Generate a {{image_description}} {{organ_description}} with the intense, realistic style of Caravaggio. Use dramatic chiaroscuro, meticulous detail, and a lifelike quality to ensure anatomical precision.",
126
+ "El Greco": f"Create a {{image_description}} {{organ_description}} inspired by El Greco's elongated forms and dramatic use of color. Emphasize fluid, almost ethereal shapes, and a strong sense of movement, while maintaining anatomical accuracy.",
127
+ "Eug猫ne Delacroix": f"Produce an accurate {{image_description}} {{organ_description}} with the romantic, dynamic style of Eug猫ne Delacroix. Use vivid colors, energetic brushstrokes, and a sense of drama to depict the anatomical details.",
128
+ "J.M.W. Turner": f"Generate a {{image_description}} {{organ_description}} in the atmospheric, impressionistic style of J.M.W. Turner. Use soft, diffused light, swirling colors, and a focus on capturing the essence and movement within the organ's structure."
129
  }
130
 
131
 
132
+ combined_prompts = {artist: prompt.replace("{{image_description}}", "{image_description}").replace("{{organ_description}}", "{organ_description}")
133
+ for artist, prompt in artist_prompts.items()}
134
+
135
 
136
  prompt_lst = [organ, modality, style]
137
 
 
148
  with st.spinner('Processing...'):
149
  print(prompt_lst)
150
 
151
+ prompt = combined_prompts[style].format(image_description=image_description, organ_description=organ_description)
152
  print(prompt)
153
+ # pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16, variant="fp16")
154
+ # pipe.to("cuda")
155
 
156
+ # image = pipe(prompt=prompt).images[0]
157
 
158
+ # st.image(image)
159
 
160
  st.session_state.button_disabled = False
161