Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -22,14 +22,29 @@ def generate_pil_images():
|
|
22 |
pil_images = [Image.fromarray(np.uint8(image)) for image in generated_images]
|
23 |
return pil_images
|
24 |
|
|
|
|
|
|
|
25 |
# Create a Gradio interface
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
|
34 |
# Launch the Gradio app
|
35 |
-
|
|
|
22 |
pil_images = [Image.fromarray(np.uint8(image)) for image in generated_images]
|
23 |
return pil_images
|
24 |
|
25 |
+
# Path to the video of training images visualization
|
26 |
+
training_video_path = "training_visualization.mp4" # Replace with your video file path
|
27 |
+
|
28 |
# Create a Gradio interface
|
29 |
+
with gr.Blocks() as demo:
|
30 |
+
with gr.Row():
|
31 |
+
with gr.Column():
|
32 |
+
gr.Markdown("# Generated Images")
|
33 |
+
gr.Interface(
|
34 |
+
fn=generate_pil_images,
|
35 |
+
inputs=[],
|
36 |
+
outputs=gr.Gallery(label="Generated Images", columns=4, height="fill"),
|
37 |
+
live=True # Live interface so it updates every time you refresh
|
38 |
+
)
|
39 |
+
with gr.Column():
|
40 |
+
gr.Markdown("# Training Visualization Video")
|
41 |
+
gr.Video(
|
42 |
+
value=training_video_path,
|
43 |
+
label="Training Visualization",
|
44 |
+
format="mp4",
|
45 |
+
autoplay=True,
|
46 |
+
loop=True
|
47 |
+
)
|
48 |
|
49 |
# Launch the Gradio app
|
50 |
+
demo.launch()
|