Update app.py
Browse files
app.py
CHANGED
|
@@ -39,21 +39,33 @@ def nagelize(text):
|
|
| 39 |
# prompt = "p_nagel"
|
| 40 |
# return pipe_img(prompt, image=source_image, strength=0.6, num_inference_steps=500, guidance_scale=40.0).images[0]
|
| 41 |
|
| 42 |
-
|
|
|
|
|
|
|
| 43 |
|
| 44 |
#girl_image = gr.Image(label = None, value = os.path.join(os.path.dirname(__file__), "headshot.jpg"), visible=False)
|
| 45 |
|
| 46 |
-
with gr.Row():
|
| 47 |
-
logo_image = gr.Image(label = None, value = os.path.join(os.path.dirname(__file__), "miami.jpg"), interactive=True).style(height=720)
|
| 48 |
-
#gr.Markdown("<img src=https://huggingface.co/spaces/mswhite/miamivice/resolve/main/miami.jpg width=720px>")
|
| 49 |
-
output = gr.Image(label="Output").style(height=720)
|
| 50 |
-
with gr.Row():
|
| 51 |
-
art_to_draw = gr.Textbox(label="Prompt to Draw: e.g. woman with red hair")
|
| 52 |
-
flashb_btn = gr.Button("Flashback to the 80s")
|
| 53 |
-
#back80_btn = gr.Button("Send me back to the 80s")
|
| 54 |
-
|
| 55 |
-
flashb_btn.click(fn=nagelize, inputs=[art_to_draw], outputs=[output])
|
| 56 |
-
#back80_btn.click(fn=nagelize, inputs=[art_to_draw], outputs=[output])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
|
| 58 |
demo.launch()
|
| 59 |
|
|
|
|
| 39 |
# prompt = "p_nagel"
|
| 40 |
# return pipe_img(prompt, image=source_image, strength=0.6, num_inference_steps=500, guidance_scale=40.0).images[0]
|
| 41 |
|
| 42 |
+
# Web Version of Blocks()
|
| 43 |
+
|
| 44 |
+
#with gr.Blocks() as demo:
|
| 45 |
|
| 46 |
#girl_image = gr.Image(label = None, value = os.path.join(os.path.dirname(__file__), "headshot.jpg"), visible=False)
|
| 47 |
|
| 48 |
+
# with gr.Row():
|
| 49 |
+
# logo_image = gr.Image(label = None, value = os.path.join(os.path.dirname(__file__), "miami.jpg"), interactive=True).style(height=720)
|
| 50 |
+
# #gr.Markdown("<img src=https://huggingface.co/spaces/mswhite/miamivice/resolve/main/miami.jpg width=720px>")
|
| 51 |
+
# output = gr.Image(label="Output").style(height=720)
|
| 52 |
+
# with gr.Row():
|
| 53 |
+
# art_to_draw = gr.Textbox(label="Prompt to Draw: e.g. woman with red hair")
|
| 54 |
+
# flashb_btn = gr.Button("Flashback to the 80s")
|
| 55 |
+
# #back80_btn = gr.Button("Send me back to the 80s")
|
| 56 |
+
|
| 57 |
+
# flashb_btn.click(fn=nagelize, inputs=[art_to_draw], outputs=[output])
|
| 58 |
+
# #back80_btn.click(fn=nagelize, inputs=[art_to_draw], outputs=[output])
|
| 59 |
+
|
| 60 |
+
# Mobile Version of Blocks
|
| 61 |
+
|
| 62 |
+
with gr.Blocks() as demo:
|
| 63 |
+
|
| 64 |
+
gr.Markdown("<img src=https://huggingface.co/spaces/mswhite/miamivice/resolve/main/miami.jpg width=720px>")
|
| 65 |
+
output = gr.Image(label="Output").style(height=720)
|
| 66 |
+
art_to_draw = gr.Textbox(label="Prompt to Draw: e.g. woman with red hair")
|
| 67 |
+
flashb_btn = gr.Button("Flashback to the 80s")
|
| 68 |
+
flashb_btn.click(fn=nagelize, inputs=[art_to_draw], outputs=[output])
|
| 69 |
|
| 70 |
demo.launch()
|
| 71 |
|