egesko commited on
Commit
0ffbf81
·
1 Parent(s): 6970d62

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -2
app.py CHANGED
@@ -7,7 +7,12 @@ import imageio
7
 
8
  generator = tf.keras.models.load_model('dc_gan.h5')
9
 
10
- def interpolate(start,end,steps,fps):
 
 
 
 
 
11
 
12
  input_vectors = np.squeeze(np.linspace(start,end,steps))
13
 
@@ -22,10 +27,13 @@ def interpolate(start,end,steps,fps):
22
  return gr.Video(value = 'test.mp4')
23
 
24
  output_interpolation = gr.Video()
 
 
25
  demo = gr.Blocks()
26
 
 
27
  with demo:
28
  btn = gr.Button("Submit")
29
- btn.click(interpolate, inputs=[start,end,steps,fps], outputs=[output_interpolation])
30
 
31
  demo.launch()
 
7
 
8
  generator = tf.keras.models.load_model('dc_gan.h5')
9
 
10
+ def interpolate(steps,fps):
11
+
12
+ #CHANGE LATER
13
+ start = tf.random.normal(shape=(1,128))
14
+ end = tf.random.normal(shape=(1,128))
15
+ #---------------
16
 
17
  input_vectors = np.squeeze(np.linspace(start,end,steps))
18
 
 
27
  return gr.Video(value = 'test.mp4')
28
 
29
  output_interpolation = gr.Video()
30
+ STEPS = gr.Slider(1, 100, step=1)
31
+ FPS = gr.Slider(1, 50, step=1)
32
  demo = gr.Blocks()
33
 
34
+
35
  with demo:
36
  btn = gr.Button("Submit")
37
+ btn.click(interpolate, inputs=[STEPS ,FPS], outputs=[output_interpolation])
38
 
39
  demo.launch()