Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -25,9 +25,9 @@ def generate_image(prompt, num_inference_steps=50, guidance_scale=7):
|
|
| 25 |
results = pipe(prompt=prompt, num_inference_steps=num_inference_steps, guidance_scale=guidance_scale)
|
| 26 |
|
| 27 |
# Safety check (if necessary)
|
| 28 |
-
if SAFETY_CHECKER:
|
| 29 |
# Implement the safety check logic here
|
| 30 |
-
pass
|
| 31 |
|
| 32 |
return results.images[0]
|
| 33 |
|
|
@@ -42,7 +42,7 @@ with gr.Blocks() as demo:
|
|
| 42 |
with gr.Row():
|
| 43 |
prompt = gr.Textbox(label='Enter your image prompt')
|
| 44 |
num_inference_steps = gr.Slider(minimum=1, maximum=75, step=1, label='Number of Inference Steps', value=50)
|
| 45 |
-
guidance_scale = gr.Slider(minimum=1, maximum=
|
| 46 |
submit = gr.Button('Generate Image')
|
| 47 |
img = gr.Image(label='Generated Image')
|
| 48 |
|
|
|
|
| 25 |
results = pipe(prompt=prompt, num_inference_steps=num_inference_steps, guidance_scale=guidance_scale)
|
| 26 |
|
| 27 |
# Safety check (if necessary)
|
| 28 |
+
#if SAFETY_CHECKER:
|
| 29 |
# Implement the safety check logic here
|
| 30 |
+
#pass
|
| 31 |
|
| 32 |
return results.images[0]
|
| 33 |
|
|
|
|
| 42 |
with gr.Row():
|
| 43 |
prompt = gr.Textbox(label='Enter your image prompt')
|
| 44 |
num_inference_steps = gr.Slider(minimum=1, maximum=75, step=1, label='Number of Inference Steps', value=50)
|
| 45 |
+
guidance_scale = gr.Slider(minimum=1, maximum=10, step=0.1, label='Guidance Scale', value=5)
|
| 46 |
submit = gr.Button('Generate Image')
|
| 47 |
img = gr.Image(label='Generated Image')
|
| 48 |
|