Epoching commited on
Commit
3525244
β€’
1 Parent(s): c22605a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -5
app.py CHANGED
@@ -9,6 +9,14 @@ import os
9
  import sys
10
  from huggingface_hub import snapshot_download
11
 
 
 
 
 
 
 
 
 
12
  os.system("git clone https://github.com/google-research/frame-interpolation")
13
  sys.path.append("frame-interpolation")
14
  from eval import interpolator, util
@@ -16,10 +24,6 @@ from eval import interpolator, util
16
  ffmpeg_path = util.get_ffmpeg_path()
17
  mediapy.set_ffmpeg(ffmpeg_path)
18
 
19
- # Pipelines / Interfaces to use
20
- story_gen = pipeline("text-generation", "pranavpsv/gpt2-genre-story-generator")
21
- image_gen = gr.Interface.load("spaces/multimodalart/latentdiffusion")
22
-
23
  # spaces/akhaliq/frame-interpolation/tree/main
24
  model = snapshot_download(repo_id="akhaliq/frame-interpolation-film-style")
25
  interpolator = interpolator.Interpolator(model, None)
@@ -109,7 +113,7 @@ with demo:
109
  with gr.Row():
110
  gr.Markdown("Image Generation Conditioned on Text: [Latent Diffusion](https://huggingface.co/spaces/multimodalart/latentdiffusion) | [Github Repo](https://github.com/CompVis/latent-diffusion)")
111
  with gr.Row():
112
- gr.Markdown("Interpolations: [Frame Interpolation](https://huggingface.co/spaces/akhaliq/frame-interpolation) | [Github Repo](https://github.com/google-research/frame-interpolation)")
113
  with gr.Row():
114
  gr.Markdown("![visitor badge](https://visitor-badge.glitch.me/badge?page_id=gradio-blocks_story_and_video_generation)")
115
 
9
  import sys
10
  from huggingface_hub import snapshot_download
11
 
12
+ # 1. GPT-J: Story Generation Pipeline
13
+ story_gen = pipeline("text-generation", "pranavpsv/gpt2-genre-story-generator")
14
+
15
+ # 2. LatentDiffusion: Latent Diffusion Interface
16
+ image_gen = gr.Interface.load("spaces/multimodalart/latentdiffusion")
17
+
18
+ # 3. FILM: Frame Interpolation Model
19
+ # code re-use from spaces/akhaliq/frame-interpolation/tree/main
20
  os.system("git clone https://github.com/google-research/frame-interpolation")
21
  sys.path.append("frame-interpolation")
22
  from eval import interpolator, util
24
  ffmpeg_path = util.get_ffmpeg_path()
25
  mediapy.set_ffmpeg(ffmpeg_path)
26
 
 
 
 
 
27
  # spaces/akhaliq/frame-interpolation/tree/main
28
  model = snapshot_download(repo_id="akhaliq/frame-interpolation-film-style")
29
  interpolator = interpolator.Interpolator(model, None)
113
  with gr.Row():
114
  gr.Markdown("Image Generation Conditioned on Text: [Latent Diffusion](https://huggingface.co/spaces/multimodalart/latentdiffusion) | [Github Repo](https://github.com/CompVis/latent-diffusion)")
115
  with gr.Row():
116
+ gr.Markdown("Interpolations: [FILM](https://huggingface.co/spaces/akhaliq/frame-interpolation) | [Github Repo](https://github.com/google-research/frame-interpolation)")
117
  with gr.Row():
118
  gr.Markdown("![visitor badge](https://visitor-badge.glitch.me/badge?page_id=gradio-blocks_story_and_video_generation)")
119