Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -382,7 +382,7 @@ def generate(
|
|
382 |
batch_options["prompt"] = options["prompt"][i:i+BATCH_SIZE]
|
383 |
if "negative_prompt" in batch_options:
|
384 |
batch_options["negative_prompt"] = options["negative_prompt"][i:i+BATCH_SIZE]
|
385 |
-
images.extend(pipe(**batch_options).images)
|
386 |
|
387 |
image_paths = [save_image(img) for img in images]
|
388 |
return image_paths, seed
|
@@ -1225,19 +1225,34 @@ def create_ui():
|
|
1225 |
like_res=gr.State([])
|
1226 |
dislike_res=gr.State([])
|
1227 |
|
1228 |
-
gr.
|
1229 |
-
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
1233 |
-
|
1234 |
-
|
1235 |
-
|
1236 |
-
|
1237 |
-
|
1238 |
-
|
1239 |
-
|
1240 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1241 |
|
1242 |
|
1243 |
# with gr.Row(align="right",visible=False) as language_select:
|
@@ -1380,11 +1395,11 @@ def create_ui():
|
|
1380 |
with gr.Column(visible=False) as modules_need_gpt3:
|
1381 |
chat_input = gr.Textbox(show_label=False, placeholder="Enter text and press Enter").style(
|
1382 |
container=False)
|
1383 |
-
with gr.Row():
|
1384 |
-
upvote_btn = gr.Button(value="๐ Upvote", interactive=True)
|
1385 |
-
downvote_btn = gr.Button(value="๐ Downvote", interactive=True)
|
1386 |
clear_button_text = gr.Button(value="Clear Text", interactive=True)
|
1387 |
submit_button_text = gr.Button(value="Send", interactive=True, variant="primary")
|
|
|
|
|
1388 |
|
1389 |
|
1390 |
with gr.Row():
|
@@ -1490,8 +1505,8 @@ def create_ui():
|
|
1490 |
)
|
1491 |
with gr.Column(scale=0.6):
|
1492 |
result = gr.Gallery(
|
1493 |
-
label="Result"
|
1494 |
-
columns=4,
|
1495 |
# rows=2,
|
1496 |
# show_label=False,
|
1497 |
# allow_preview=True,
|
@@ -1500,7 +1515,7 @@ def create_ui():
|
|
1500 |
# preview=True,
|
1501 |
# show_share_button=True,
|
1502 |
# show_download_button=True
|
1503 |
-
)
|
1504 |
|
1505 |
|
1506 |
|
|
|
382 |
batch_options["prompt"] = options["prompt"][i:i+BATCH_SIZE]
|
383 |
if "negative_prompt" in batch_options:
|
384 |
batch_options["negative_prompt"] = options["negative_prompt"][i:i+BATCH_SIZE]
|
385 |
+
images.extend((pipe(**batch_options).images), f"label {i}")
|
386 |
|
387 |
image_paths = [save_image(img) for img in images]
|
388 |
return image_paths, seed
|
|
|
1225 |
like_res=gr.State([])
|
1226 |
dislike_res=gr.State([])
|
1227 |
|
1228 |
+
with gr.Row(align="right") as main_row:
|
1229 |
+
with gr.Column(scale=0.5):
|
1230 |
+
# gr.Markdown("Left side content")
|
1231 |
+
gr.Markdown(title)
|
1232 |
+
gr.Markdown(description)
|
1233 |
+
with gr.Column(scale=0.5):
|
1234 |
+
with gr.Row(align="right",visible=False) as language_select:
|
1235 |
+
language = gr.Dropdown(
|
1236 |
+
['English', 'Chinese', 'French', "Spanish", "Arabic", "Portuguese", "Cantonese"],
|
1237 |
+
value="English", label="Language", interactive=True)
|
1238 |
+
|
1239 |
+
with gr.Row(align="right",visible=False) as autoplay:
|
1240 |
+
auto_play = gr.Checkbox(label="Check to autoplay audio", value=False,scale=0.4)
|
1241 |
+
output_audio = gr.HTML(label="Synthesised Audio",scale=0.6)
|
1242 |
+
|
1243 |
+
|
1244 |
+
|
1245 |
+
# with gr.Row(align="right", visible=False, elem_id="top_row") as top_row:
|
1246 |
+
# language = gr.Dropdown(
|
1247 |
+
# ['English', 'Chinese', 'French', "Spanish", "Arabic", "Portuguese", "Cantonese"],
|
1248 |
+
# value="English", label="Language", interactive=True, scale=0.2, elem_classes="custom-language"
|
1249 |
+
# )
|
1250 |
+
# auto_play = gr.Checkbox(
|
1251 |
+
# label="Check to autoplay audio", value=False, scale=0.4, elem_classes="custom-autoplay"
|
1252 |
+
# )
|
1253 |
+
# output_audio = gr.HTML(
|
1254 |
+
# label="Synthesised Audio", scale=0.3, elem_classes="custom-output"
|
1255 |
+
# )
|
1256 |
|
1257 |
|
1258 |
# with gr.Row(align="right",visible=False) as language_select:
|
|
|
1395 |
with gr.Column(visible=False) as modules_need_gpt3:
|
1396 |
chat_input = gr.Textbox(show_label=False, placeholder="Enter text and press Enter").style(
|
1397 |
container=False)
|
1398 |
+
with gr.Row():
|
|
|
|
|
1399 |
clear_button_text = gr.Button(value="Clear Text", interactive=True)
|
1400 |
submit_button_text = gr.Button(value="Send", interactive=True, variant="primary")
|
1401 |
+
upvote_btn = gr.Button(value="๐ Upvote", interactive=True)
|
1402 |
+
downvote_btn = gr.Button(value="๐ Downvote", interactive=True)
|
1403 |
|
1404 |
|
1405 |
with gr.Row():
|
|
|
1505 |
)
|
1506 |
with gr.Column(scale=0.6):
|
1507 |
result = gr.Gallery(
|
1508 |
+
label="Result"
|
1509 |
+
# columns=4,
|
1510 |
# rows=2,
|
1511 |
# show_label=False,
|
1512 |
# allow_preview=True,
|
|
|
1515 |
# preview=True,
|
1516 |
# show_share_button=True,
|
1517 |
# show_download_button=True
|
1518 |
+
).style(height='auto',columns=4)
|
1519 |
|
1520 |
|
1521 |
|