|
import streamlit as st |
|
|
|
def handle_prompt_click(prompt_text, key): |
|
st.session_state[f'selected_prompt_{key}'] = prompt_text |
|
st.write(f"Generated prompt for: {prompt_text}") |
|
|
|
def main(): |
|
st.title("๐จ Art Prompt Generator") |
|
st.markdown("### Select a prompt style to generate artwork:") |
|
|
|
|
|
prompt_emojis = { |
|
"AIart/AIArtistCommunity": "๐ค", |
|
"Black & White": "โซโช", |
|
"Black & Yellow": "โซ๐", |
|
"Blindfold": "๐", |
|
"Break": "๐", |
|
"Broken": "๐จ", |
|
"Christmas Celebrations art": "๐", |
|
"Colorful Art": "๐จ", |
|
"Crimson art": "๐ด", |
|
"Eyes Art": "๐๏ธ", |
|
"Going out with Style": "๐", |
|
"Hooded Girl": "๐งฅ", |
|
"Lips": "๐", |
|
"MAEKHLONG": "๐ฎ", |
|
"Mermaid": "๐งโโ๏ธ", |
|
"Morning Sunshine": "๐
", |
|
"Music Art": "๐ต", |
|
"Owl": "๐ฆ", |
|
"Pink": "๐", |
|
"Purple": "๐", |
|
"Rain": "๐ง๏ธ", |
|
"Red Moon": "๐", |
|
"Rose": "๐น", |
|
"Snow": "โ๏ธ", |
|
"Spacesuit Girl": "๐ฉโ๐", |
|
"Steampunk": "โ๏ธ", |
|
"Succubus": "๐", |
|
"Sunlight": "โ๏ธ", |
|
"Weird art": "๐ญ", |
|
"White Hair": "๐ฑโโ๏ธ", |
|
"Wings art": "๐ผ", |
|
"Woman with Sword": "โ๏ธ" |
|
} |
|
|
|
|
|
col1, col2, col3 = st.columns(3) |
|
|
|
|
|
for idx, (prompt, emoji) in enumerate(prompt_emojis.items()): |
|
full_prompt = f"QT {prompt}" |
|
col = [col1, col2, col3][idx % 3] |
|
|
|
with col: |
|
if st.button(f"{emoji} {prompt}", key=f"btn_{idx}"): |
|
handle_prompt_click(full_prompt, idx) |
|
|
|
|
|
st.markdown("---") |
|
st.markdown("### Generated Prompts:") |
|
for key in st.session_state: |
|
if key.startswith('selected_prompt_'): |
|
st.write(st.session_state[key]) |
|
|
|
if __name__ == "__main__": |
|
main() |