Spaces:
Running
on
A10G
Running
on
A10G
rynmurdock
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -92,12 +92,13 @@ def next_image():
|
|
92 |
print(prompt)
|
93 |
|
94 |
im_emb_st = str(im_emb[0].cpu().detach().tolist())[1:-1]
|
95 |
-
|
96 |
-
output
|
|
|
97 |
|
98 |
output = replicate.run(
|
99 |
"rynmurdock/zahir:210b8cdb9aa8ac97325fd534db13ad1a2b3b1226ee2109a20952a810b94216b6",
|
100 |
-
input={"prompt": prompt, 'im_emb':
|
101 |
)
|
102 |
response = requests.get(output['file1'])
|
103 |
image = Image.open(BytesIO(response.content))
|
@@ -140,8 +141,6 @@ def choose(choice):
|
|
140 |
|
141 |
css = "div#output-image {height: 768px !important; width: 768px !important; margin:auto;}"
|
142 |
with gr.Blocks(css=css) as demo:
|
143 |
-
with gr.Row():
|
144 |
-
html = gr.HTML('''<div style='text-align:center; font-size:32'>You will callibrate for several prompts and then roam.</ div>''')
|
145 |
with gr.Row(elem_id='output-image'):
|
146 |
img = gr.Image(interactive=False, elem_id='output-image',)
|
147 |
with gr.Row(equal_height=True):
|
@@ -168,5 +167,7 @@ with gr.Blocks(css=css) as demo:
|
|
168 |
b4.click(start,
|
169 |
[b4],
|
170 |
[b1, b2, b3, b4, img,])
|
|
|
|
|
171 |
|
172 |
demo.launch() # Share your demo with just 1 extra parameter π
|
|
|
92 |
print(prompt)
|
93 |
|
94 |
im_emb_st = str(im_emb[0].cpu().detach().tolist())[1:-1]
|
95 |
+
|
96 |
+
#output = StringIO()
|
97 |
+
#output.write(im_emb_st)
|
98 |
|
99 |
output = replicate.run(
|
100 |
"rynmurdock/zahir:210b8cdb9aa8ac97325fd534db13ad1a2b3b1226ee2109a20952a810b94216b6",
|
101 |
+
input={"prompt": prompt, 'im_emb': im_emb_st}
|
102 |
)
|
103 |
response = requests.get(output['file1'])
|
104 |
image = Image.open(BytesIO(response.content))
|
|
|
141 |
|
142 |
css = "div#output-image {height: 768px !important; width: 768px !important; margin:auto;}"
|
143 |
with gr.Blocks(css=css) as demo:
|
|
|
|
|
144 |
with gr.Row(elem_id='output-image'):
|
145 |
img = gr.Image(interactive=False, elem_id='output-image',)
|
146 |
with gr.Row(equal_height=True):
|
|
|
167 |
b4.click(start,
|
168 |
[b4],
|
169 |
[b1, b2, b3, b4, img,])
|
170 |
+
with gr.Row():
|
171 |
+
html = gr.HTML('''<div style='text-align:center; font-size:32'>You will callibrate for several prompts and then roam.</ div>''')
|
172 |
|
173 |
demo.launch() # Share your demo with just 1 extra parameter π
|