Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -32,58 +32,100 @@ def send_it1(inputs, model_choice):
|
|
| 32 |
return(output1)
|
| 33 |
css=""""""
|
| 34 |
|
| 35 |
-
with gr.Blocks(css=
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
gr.
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
with gr.
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
def short_prompt(inputs):
|
| 88 |
return(inputs)
|
| 89 |
|
|
|
|
| 32 |
return(output1)
|
| 33 |
css=""""""
|
| 34 |
|
| 35 |
+
with gr.Blocks(css=css) as myface:
|
| 36 |
+
gr.HTML("""<!DOCTYPE html>
|
| 37 |
+
<html lang="en">
|
| 38 |
+
<head>
|
| 39 |
+
<meta charset="utf-8" />
|
| 40 |
+
<meta name="twitter:card" content="player"/>
|
| 41 |
+
<meta name="twitter:site" content=""/>
|
| 42 |
+
<meta name="twitter:player" content="https://omnibus-maximum-multiplier-places.hf.space"/>
|
| 43 |
+
<meta name="twitter:player:stream" content="https://omnibus-maximum-multiplier-places.hf.space"/>
|
| 44 |
+
<meta name="twitter:player:width" content="100%"/>
|
| 45 |
+
<meta name="twitter:player:height" content="600"/>
|
| 46 |
+
<meta property="og:title" content="Embedded Live Viewer"/>
|
| 47 |
+
<meta property="og:description" content="Tweet Genie - A Huggingface Space"/>
|
| 48 |
+
<meta property="og:image" content="https://cdn.glitch.global/80dbe92e-ce75-44af-84d5-74a2e21e9e55/omnicard.png?v=1676772531627"/>
|
| 49 |
+
<!--<meta http-equiv="refresh" content="0; url=https://huggingface.co/spaces/corbt/tweet-genie">-->
|
| 50 |
+
</head>
|
| 51 |
+
</html>
|
| 52 |
+
""")
|
| 53 |
+
with gr.Row():
|
| 54 |
+
with gr.Tab("Title"):
|
| 55 |
+
gr.HTML(""" <title>Minimum Multiplier</title><div style="text-align: center; max-width: 1500px; margin: 0 auto;">
|
| 56 |
+
<h1>Fill the Textbox at the top and click Generate Image</h1>
|
| 57 |
+
<br><h4>The first time you load a model it takes 200 seconds</h4>
|
| 58 |
+
<br><h4>But after it loads each image takes 20 seconds to generate!</h4>
|
| 59 |
+
|
| 60 |
+
""")
|
| 61 |
+
|
| 62 |
+
with gr.Tab("Description"):
|
| 63 |
+
gr.HTML("""<div style="text-align:center;">
|
| 64 |
+
<h4>As many Text-to-Image Models as I can fit here</h4><br>
|
| 65 |
+
<h4>Suggest more up in the "Community" button</h4>
|
| 66 |
+
|
| 67 |
+
</div>""")
|
| 68 |
+
|
| 69 |
+
with gr.Tab("Tools"):
|
| 70 |
+
with gr.Tab("View"):
|
| 71 |
+
with gr.Row():
|
| 72 |
+
with gr.Column(style="width=50%, height=70%"):
|
| 73 |
+
gr.Pil(label="Crop")
|
| 74 |
+
with gr.Column(style="width=50%, height=70%"):
|
| 75 |
+
gr.Pil(label="Crop")
|
| 76 |
+
|
| 77 |
+
|
| 78 |
+
with gr.Tab("Draw"):
|
| 79 |
+
with gr.Column(style="width=50%, height=70%"):
|
| 80 |
+
gr.Pil(label="Crop")
|
| 81 |
+
with gr.Column(style="width=50%, height=70%"):
|
| 82 |
+
gr.Pil(label="Draw")
|
| 83 |
+
|
| 84 |
+
|
| 85 |
+
gr.ImagePaint(label="Draw")
|
| 86 |
+
|
| 87 |
+
with gr.Tab("Text"):
|
| 88 |
+
with gr.Row():
|
| 89 |
+
|
| 90 |
+
with gr.Column(scale=50):
|
| 91 |
+
gr.Textbox(label="", lines=8, interactive=True)
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
with gr.Column(scale=50):
|
| 95 |
+
gr.Textbox(label="", lines=8, interactive=True)
|
| 96 |
+
|
| 97 |
+
with gr.Tab("Color Picker"):
|
| 98 |
+
with gr.Row():
|
| 99 |
+
|
| 100 |
+
with gr.Column(scale=50):
|
| 101 |
+
gr.ColorPicker(label="Color", interactive=True)
|
| 102 |
+
|
| 103 |
+
|
| 104 |
+
with gr.Column(scale=50):
|
| 105 |
+
gr.ImagePaint(label="Draw", interactive=True)
|
| 106 |
+
with gr.Row():
|
| 107 |
+
with gr.Column(scale=100):
|
| 108 |
+
magic1=gr.Textbox(lines=4)
|
| 109 |
+
gr.HTML("""<style> .gr-button {
|
| 110 |
+
color: white !important;
|
| 111 |
+
border-color: #000000 !important;
|
| 112 |
+
background: #006699 !important;
|
| 113 |
+
}</style>""")
|
| 114 |
+
run=gr.Button("Generate Image")
|
| 115 |
+
with gr.Row():
|
| 116 |
+
with gr.Column(scale=100):
|
| 117 |
+
#Model selection dropdown
|
| 118 |
+
model_name1 = gr.Dropdown(label="Select Model", choices=[m for m in models], type="index", value=current_model, interactive=True)
|
| 119 |
+
with gr.Row():
|
| 120 |
+
with gr.Column(style="width=800px"):
|
| 121 |
+
output1=gr.Image(label=(f"{current_model}"))
|
| 122 |
+
|
| 123 |
+
|
| 124 |
+
with gr.Row():
|
| 125 |
+
with gr.Column(scale=50):
|
| 126 |
+
input_text=gr.Textbox(label="Use this box to extend an idea automagically, by typing some words and clicking Extend Idea",lines=2)
|
| 127 |
+
use_short=gr.Button("Use Short Prompt")
|
| 128 |
+
see_prompts=gr.Button("Extend Idea")
|
| 129 |
def short_prompt(inputs):
|
| 130 |
return(inputs)
|
| 131 |
|