Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -117,7 +117,7 @@ def query(prompt, is_realistic):
|
|
117 |
image_bytes = response.content
|
118 |
image = Image.open(io.BytesIO(image_bytes))
|
119 |
|
120 |
-
if (
|
121 |
image = add_noise(image, intensity = randint(75, 125) / 10)
|
122 |
image = resize_and_crop(image, 360, 640)
|
123 |
image = compress_image(image, randint(75, 95))
|
@@ -162,9 +162,8 @@ with gr.Blocks(theme='gstaff/xkcd', css=css) as app:
|
|
162 |
with gr.Column(elem_id="app-container"):
|
163 |
with gr.Row():
|
164 |
with gr.Column(elem_id="prompt-container"):
|
165 |
-
|
166 |
-
|
167 |
-
is_realistic = gr.Checkbox(label="Home-made filter", value=True)
|
168 |
|
169 |
with gr.Row():
|
170 |
text_button = gr.Button("Run", variant='primary', elem_id="gen-button")
|
|
|
117 |
image_bytes = response.content
|
118 |
image = Image.open(io.BytesIO(image_bytes))
|
119 |
|
120 |
+
if (is_realistic == True):
|
121 |
image = add_noise(image, intensity = randint(75, 125) / 10)
|
122 |
image = resize_and_crop(image, 360, 640)
|
123 |
image = compress_image(image, randint(75, 95))
|
|
|
162 |
with gr.Column(elem_id="app-container"):
|
163 |
with gr.Row():
|
164 |
with gr.Column(elem_id="prompt-container"):
|
165 |
+
text_prompt = gr.Textbox(label="Prompt", placeholder="Enter a prompt here", lines=2, elem_id="prompt-text-input", value=test_prompt)
|
166 |
+
is_realistic = gr.Checkbox(label="Realistic filter", value=True)
|
|
|
167 |
|
168 |
with gr.Row():
|
169 |
text_button = gr.Button("Run", variant='primary', elem_id="gen-button")
|