Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,8 @@ 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 |
-
|
|
|
20 |
|
21 |
title = """<h1 align="center">SD-T2I-360PanoImage</h1>
|
22 |
<p align="center">360° Panorama Image Generation</p>
|
@@ -42,7 +43,7 @@ with gr.Blocks(theme='bethecloud/storj_theme') as demo:
|
|
42 |
t2p_generate.click(
|
43 |
text_to_pano,
|
44 |
inputs=[t2p_input, t2p_upscale],
|
45 |
-
outputs=[t2p_output, t2p_image_output
|
46 |
)
|
47 |
|
48 |
demo.launch()
|
|
|
16 |
def text_to_pano(prompt, upscale):
|
17 |
input_data = {'prompt': prompt, 'upscale': upscale, 'refinement': False}
|
18 |
output = txt2panoimg(input_data)
|
19 |
+
timestamp = int(time.time() * 1000) # Add this line
|
20 |
+
return f"{output}?t={timestamp}", output # Modify this line
|
21 |
|
22 |
title = """<h1 align="center">SD-T2I-360PanoImage</h1>
|
23 |
<p align="center">360° Panorama Image Generation</p>
|
|
|
43 |
t2p_generate.click(
|
44 |
text_to_pano,
|
45 |
inputs=[t2p_input, t2p_upscale],
|
46 |
+
outputs=[t2p_output, t2p_image_output]
|
47 |
)
|
48 |
|
49 |
demo.launch()
|