Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,7 +16,7 @@ txt2panoimg = Text2360PanoramaImagePipeline(model_path, torch_dtype=torch.float1
|
|
| 16 |
def text_to_pano(prompt, upscale):
|
| 17 |
input_data = {'prompt': prompt, 'upscale': upscale, 'refinement': False}
|
| 18 |
output = txt2panoimg(input_data)
|
| 19 |
-
return output, output
|
| 20 |
|
| 21 |
|
| 22 |
|
|
@@ -36,15 +36,15 @@ with gr.Blocks(theme='bethecloud/storj_theme') as demo:
|
|
| 36 |
t2p_upscale = gr.Checkbox(label="Upscale (takes about 60 seconds 6144x3072 resolution)")
|
| 37 |
t2p_generate = gr.Button("Generate Panorama")
|
| 38 |
with gr.Column(variant="default"):
|
| 39 |
-
t2p_output = Pannellum(show_label=False, interactive=True)
|
| 40 |
|
| 41 |
with gr.Row():
|
| 42 |
-
t2p_image_output = gr.Image(label="Generated Image")
|
| 43 |
|
| 44 |
t2p_generate.click(
|
| 45 |
text_to_pano,
|
| 46 |
inputs=[t2p_input, t2p_upscale],
|
| 47 |
-
outputs=[t2p_output, t2p_image_output]
|
| 48 |
)
|
| 49 |
|
| 50 |
demo.launch()
|
|
|
|
| 16 |
def text_to_pano(prompt, upscale):
|
| 17 |
input_data = {'prompt': prompt, 'upscale': upscale, 'refinement': False}
|
| 18 |
output = txt2panoimg(input_data)
|
| 19 |
+
return output, output, gr.update(visible=True, value=output)
|
| 20 |
|
| 21 |
|
| 22 |
|
|
|
|
| 36 |
t2p_upscale = gr.Checkbox(label="Upscale (takes about 60 seconds 6144x3072 resolution)")
|
| 37 |
t2p_generate = gr.Button("Generate Panorama")
|
| 38 |
with gr.Column(variant="default"):
|
| 39 |
+
t2p_output = Pannellum(show_label=False, interactive=True, visible=False)
|
| 40 |
|
| 41 |
with gr.Row():
|
| 42 |
+
t2p_image_output = gr.Image(label="Generated Image", visible=False)
|
| 43 |
|
| 44 |
t2p_generate.click(
|
| 45 |
text_to_pano,
|
| 46 |
inputs=[t2p_input, t2p_upscale],
|
| 47 |
+
outputs=[t2p_output, t2p_image_output, t2p_image_output]
|
| 48 |
)
|
| 49 |
|
| 50 |
demo.launch()
|