Spaces:
Running
on
Zero
Running
on
Zero
fixing enhance prompt bug
Browse files- S2I/modules/sketch2image.py +2 -0
- app.py +1 -1
S2I/modules/sketch2image.py
CHANGED
@@ -87,6 +87,8 @@ class Sketch2ImagePipeline(PrimaryModel):
|
|
87 |
remaining_text = enhanced_text[match.end():].strip()
|
88 |
modified_sentence = match.group(1).capitalize()
|
89 |
enhanced_text = modified_sentence + ' ' + remaining_text
|
|
|
|
|
90 |
return enhanced_text
|
91 |
|
92 |
def _move_to_cpu(self, module):
|
|
|
87 |
remaining_text = enhanced_text[match.end():].strip()
|
88 |
modified_sentence = match.group(1).capitalize()
|
89 |
enhanced_text = modified_sentence + ' ' + remaining_text
|
90 |
+
else:
|
91 |
+
enhanced_text = input_prompt
|
92 |
return enhanced_text
|
93 |
|
94 |
def _move_to_cpu(self, module):
|
app.py
CHANGED
@@ -260,7 +260,7 @@ with gr.Blocks(css=css, theme="NoCrypt/miku@1.2.1") as demo:
|
|
260 |
show_download_button=True,
|
261 |
)
|
262 |
with gr.Group():
|
263 |
-
|
264 |
prompt = gr.Textbox(label="Personalized Text", value="", show_label=True)
|
265 |
with gr.Row():
|
266 |
run_button = gr.Button("Generate 🪄", min_width=5, variant='primary')
|
|
|
260 |
show_download_button=True,
|
261 |
)
|
262 |
with gr.Group():
|
263 |
+
prompt_quality = gr.Checkbox(label="Use Automatic Generate High-Quality prompt", value=True)
|
264 |
prompt = gr.Textbox(label="Personalized Text", value="", show_label=True)
|
265 |
with gr.Row():
|
266 |
run_button = gr.Button("Generate 🪄", min_width=5, variant='primary')
|