Update app.py
Browse files
app.py
CHANGED
@@ -92,19 +92,23 @@ def star_fn(inp):
|
|
92 |
with gr.Blocks() as app:
|
93 |
with gr.Row():
|
94 |
with gr.Column():
|
95 |
-
|
|
|
|
|
|
|
|
|
|
|
96 |
with gr.Row():
|
97 |
-
btn=gr.Button("Make Image")
|
98 |
update_game=gr.Button("Use Image")
|
99 |
out_im_sky=gr.Image(type='filepath',width=50)
|
100 |
out_im_star=gr.Image(type='filepath',width=50)
|
101 |
out_sky_url=gr.Textbox(visible=False)
|
102 |
out_star_url=gr.Textbox(visible=False)
|
103 |
-
start_prompt=gr.Textbox(value="beautiful landscape, real, 8k",visible=False)
|
104 |
html_game = gr.HTML()
|
105 |
|
106 |
update_game.click(game_fn,[out_sky_url,out_star_url],html_game)
|
107 |
-
|
108 |
-
|
109 |
-
app.load(sky_fn,
|
110 |
app.queue(concurrency_count=10).launch()
|
|
|
92 |
with gr.Blocks() as app:
|
93 |
with gr.Row():
|
94 |
with gr.Column():
|
95 |
+
with gr.Row()
|
96 |
+
prompt_sky=gr.Textbox("Background",value="beautiful landscape, real, 8k")
|
97 |
+
btn_sky=gr.Button("Make")
|
98 |
+
with gr.Row()
|
99 |
+
prompt_star=gr.Textbox("Star")
|
100 |
+
btn_star=gr.Button("Make")
|
101 |
with gr.Row():
|
|
|
102 |
update_game=gr.Button("Use Image")
|
103 |
out_im_sky=gr.Image(type='filepath',width=50)
|
104 |
out_im_star=gr.Image(type='filepath',width=50)
|
105 |
out_sky_url=gr.Textbox(visible=False)
|
106 |
out_star_url=gr.Textbox(visible=False)
|
107 |
+
#start_prompt=gr.Textbox(value="beautiful landscape, real, 8k",visible=False)
|
108 |
html_game = gr.HTML()
|
109 |
|
110 |
update_game.click(game_fn,[out_sky_url,out_star_url],html_game)
|
111 |
+
btn_sky.click(sky_fn,prompt,[out_im_sky,out_sky_url])
|
112 |
+
btn_star.click(star_fn,prompt,[out_im_star,out_star_url])
|
113 |
+
app.load(sky_fn,prompt_sky,[out_im_sky,out_sky_url]).then(game_fn,[out_sky_url],html_game)
|
114 |
app.queue(concurrency_count=10).launch()
|