Tanmay09516 commited on
Commit
bf38ef4
·
verified ·
1 Parent(s): 355f787

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -8
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
- iface = gr.Interface(
27
- fn=generate_pil_images,
28
- inputs=[],
29
- outputs=gr.Gallery(label="Generated Images",columns=4, height="fill"),
30
- title="Generated Images",
31
- description="This Gradio app generates 16 random images using a pre-trained generator model whenever the interface is refreshed."
32
- )
 
 
 
 
 
 
 
 
 
 
 
 
33
 
34
  # Launch the Gradio app
35
- iface.launch()
 
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()