Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,14 @@ def ai(text):
|
|
5 |
dalle = replicate.models.get("borisdayma/dalle-mini")
|
6 |
output = dalle.predict(prompt=text, n_predictions=4)
|
7 |
print(output[0]["image"])
|
8 |
-
return output[0]["image"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
-
demo = gr.Interface(fn=ai, inputs="text", outputs="image")
|
11 |
demo.launch()
|
|
|
5 |
dalle = replicate.models.get("borisdayma/dalle-mini")
|
6 |
output = dalle.predict(prompt=text, n_predictions=4)
|
7 |
print(output[0]["image"])
|
8 |
+
return [output[0]["image"], output[1]["image"]]
|
9 |
+
|
10 |
+
with gr.Blocks() as demo:
|
11 |
+
inp = gr.Textbox(placeholder="Gandalf holding a staff that will open a portal to Middle Earth, digital art")
|
12 |
+
with gr.Row():
|
13 |
+
out = gr.Image()
|
14 |
+
out2 = gr.Image()
|
15 |
+
btn = gr.Button("Run")
|
16 |
+
btn.click(fn=update, inputs=inp, outputs=[out, out2])
|
17 |
|
|
|
18 |
demo.launch()
|