awacke1 commited on
Commit
15d0d7e
โ€ข
1 Parent(s): ed64d4e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +61 -37
app.py CHANGED
@@ -1,43 +1,67 @@
1
  import streamlit as st
2
 
3
- prompts='''
 
 
4
 
5
- # Analysis-Of-Image-Song-Video-Prompts
 
 
6
 
7
- Here are the entries alphabetically with "QT" added:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
 
9
- QT AIart/AIArtistCommunity
10
- QT Black & White
11
- QT Black & Yellow
12
- QT Blindfold
13
- QT Break
14
- QT Broken
15
- QT Christmas Celebrations art
16
- QT Colorful Art
17
- QT Crimson art
18
- QT Eyes Art
19
- QT Going out with Style
20
- QT Hooded Girl
21
- QT Lips
22
- QT MAEKHLONG
23
- QT Mermaid
24
- QT Morning Sunshine
25
- QT Music Art
26
- QT Owl
27
- QT Pink
28
- QT Purple
29
- QT Rain
30
- QT Red Moon
31
- QT Rose
32
- QT Snow
33
- QT Spacesuit Girl
34
- QT Steampunk
35
- QT Succubus
36
- QT Sunlight
37
- QT Weird art
38
- QT White Hair
39
- QT Wings art
40
- QT Woman with Sword
41
- '''
42
 
43
- st.markdown(prompts)
 
 
1
  import streamlit as st
2
 
3
+ def handle_prompt_click(prompt_text, key):
4
+ st.session_state[f'selected_prompt_{key}'] = prompt_text
5
+ st.write(f"Generated prompt for: {prompt_text}")
6
 
7
+ def main():
8
+ st.title("๐ŸŽจ Art Prompt Generator")
9
+ st.markdown("### Select a prompt style to generate artwork:")
10
 
11
+ # Dictionary mapping prompts to emojis
12
+ prompt_emojis = {
13
+ "AIart/AIArtistCommunity": "๐Ÿค–",
14
+ "Black & White": "โšซโšช",
15
+ "Black & Yellow": "โšซ๐Ÿ’›",
16
+ "Blindfold": "๐Ÿ™ˆ",
17
+ "Break": "๐Ÿ’”",
18
+ "Broken": "๐Ÿ”จ",
19
+ "Christmas Celebrations art": "๐ŸŽ„",
20
+ "Colorful Art": "๐ŸŽจ",
21
+ "Crimson art": "๐Ÿ”ด",
22
+ "Eyes Art": "๐Ÿ‘๏ธ",
23
+ "Going out with Style": "๐Ÿ’ƒ",
24
+ "Hooded Girl": "๐Ÿงฅ",
25
+ "Lips": "๐Ÿ‘„",
26
+ "MAEKHLONG": "๐Ÿฎ",
27
+ "Mermaid": "๐Ÿงœโ€โ™€๏ธ",
28
+ "Morning Sunshine": "๐ŸŒ…",
29
+ "Music Art": "๐ŸŽต",
30
+ "Owl": "๐Ÿฆ‰",
31
+ "Pink": "๐Ÿ’—",
32
+ "Purple": "๐Ÿ’œ",
33
+ "Rain": "๐ŸŒง๏ธ",
34
+ "Red Moon": "๐ŸŒ‘",
35
+ "Rose": "๐ŸŒน",
36
+ "Snow": "โ„๏ธ",
37
+ "Spacesuit Girl": "๐Ÿ‘ฉโ€๐Ÿš€",
38
+ "Steampunk": "โš™๏ธ",
39
+ "Succubus": "๐Ÿ˜ˆ",
40
+ "Sunlight": "โ˜€๏ธ",
41
+ "Weird art": "๐ŸŽญ",
42
+ "White Hair": "๐Ÿ‘ฑโ€โ™€๏ธ",
43
+ "Wings art": "๐Ÿ‘ผ",
44
+ "Woman with Sword": "โš”๏ธ"
45
+ }
46
 
47
+ # Create columns for better button layout
48
+ col1, col2, col3 = st.columns(3)
49
+
50
+ # Distribute buttons across columns
51
+ for idx, (prompt, emoji) in enumerate(prompt_emojis.items()):
52
+ full_prompt = f"QT {prompt}"
53
+ col = [col1, col2, col3][idx % 3]
54
+
55
+ with col:
56
+ if st.button(f"{emoji} {prompt}", key=f"btn_{idx}"):
57
+ handle_prompt_click(full_prompt, idx)
58
+
59
+ # Display selected prompt if any
60
+ st.markdown("---")
61
+ st.markdown("### Generated Prompts:")
62
+ for key in st.session_state:
63
+ if key.startswith('selected_prompt_'):
64
+ st.write(st.session_state[key])
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
 
66
+ if __name__ == "__main__":
67
+ main()