schnik commited on
Commit
4c8b1a4
1 Parent(s): 63cd3e0

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +8 -5
app.py CHANGED
@@ -11,15 +11,18 @@ def no_cpu_warning(video_file, dataset, lora, size):
11
 
12
  if not os.path.exists(output):
13
  print(output)
14
- raise gr.Error("This combination of video and model has not been cached. Try one of the listed examples below instead.")
15
 
16
- gr.Warning("This interface is running on CPU. Only cached examples are displayed here, no novel music is generated. Please be patient, as the videos meight take a while to be downloaded.")
17
  print("Displaying video: " + output)
18
  return output
19
 
20
- interface = gr.Interface(fn=no_cpu_warning,
 
 
21
  inputs=[
22
- gr.Video(label="Original Video",
 
23
  min_length=5,
24
  max_length=20,
25
  sources=[],
@@ -71,6 +74,6 @@ interface = gr.Interface(fn=no_cpu_warning,
71
  )
72
 
73
  if __name__ == "__main__":
74
- interface.launch(
75
  share=False
76
  )
 
11
 
12
  if not os.path.exists(output):
13
  print(output)
14
+ raise gr.Error("This combination of video and model has not been cached. Try one of the listed examples instead.")
15
 
16
+ gr.Warning("This interface is running on CPU. Only cached generated examples are displayed here, no new music is generated. Please be patient, as the videos meight take a while to download.")
17
  print("Displaying video: " + output)
18
  return output
19
 
20
+ with gr.Blocks() as demo:
21
+ gr.Markdown('<span style="color:yellow"> **WARNING**: Multiple cached videos are examples are displayed here. Please be patient, as the videos meight take a while to download.</span>')
22
+ gr.Interface(fn=no_cpu_warning,
23
  inputs=[
24
+ gr.Video(value="./videos/n_5.mp4",
25
+ label="Original Video",
26
  min_length=5,
27
  max_length=20,
28
  sources=[],
 
74
  )
75
 
76
  if __name__ == "__main__":
77
+ demo.launch(
78
  share=False
79
  )