Skip to content

Commit

Permalink
update input titles in qr code recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
devxpy committed Dec 31, 2023
1 parent f1f4b2c commit f568eed
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions recipes/QRCodeGenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,21 +143,13 @@ def related_workflows(self) -> list:
def render_form_v2(self):
st.text_area(
"""
### πŸ‘©β€πŸ’» Prompt
##### πŸ‘©β€πŸ’» Prompt
Describe the subject/scene of the QR Code.
Choose clear prompts and distinguishable visuals to ensure optimal readability.
""",
key="text_prompt",
placeholder="Bright sunshine coming through the cracks of a wet, cave wall of big rocks",
)
st.file_uploader(
"""
### 🏞️ Reference Image [optional]
This image will be used as inspiration to blend with the QR Code.
""",
key="image_prompt",
accept=["image/*"],
)

qr_code_source_key = "__qr_code_source"
if qr_code_source_key not in st.session_state:
Expand Down Expand Up @@ -213,6 +205,15 @@ def render_form_v2(self):
'A shortened URL enables the QR code to be more beautiful and less "QR-codey" with fewer blocky pixels.'
)

st.file_uploader(
"""
##### 🏞️ Reference Image *[optional]*
This image will be used as inspiration to blend with the QR Code.
""",
key="image_prompt",
accept=["image/*"],
)

def validate_form_v2(self):
assert st.session_state.get("text_prompt"), "Please provide a prompt"
assert any(
Expand Down Expand Up @@ -301,7 +302,7 @@ def render_settings(self):

st.write(
"""
##### βŒ– Positioning
##### βŒ– QR Positioning
Use this to control where the QR code is placed in the image, and how big it should be.
""",
className="gui-input",
Expand Down Expand Up @@ -374,7 +375,7 @@ def render_settings(self):
)
st.write(
"""
##### βŒ– Positioning
##### βŒ– Reference Image Positioning
Use this to control where the reference image is placed, and how big it should be.
""",
className="gui-input",
Expand Down

0 comments on commit f568eed

Please sign in to comment.