Spaces:
Runtime error
Runtime error
Commit
·
f55372e
1
Parent(s):
f8b1478
fixing formatting
Browse files
app.py
CHANGED
@@ -26,6 +26,7 @@ mediapy.set_ffmpeg(ffmpeg_path)
|
|
26 |
model = snapshot_download(repo_id="akhaliq/frame-interpolation-film-style")
|
27 |
interpolator = interpolator.Interpolator(model, None)
|
28 |
|
|
|
29 |
def generate_story(choice, input_text):
|
30 |
query = "<BOS> <{0}> {1}".format(choice, input_text)
|
31 |
|
@@ -36,6 +37,7 @@ def generate_story(choice, input_text):
|
|
36 |
|
37 |
return generated_text
|
38 |
|
|
|
39 |
def generate_images(text, width=256, height=256, steps=50, num_images=1, diversity=4):
|
40 |
|
41 |
image_bytes = image_gen(text, steps, width, height, num_images, diversity)
|
@@ -50,8 +52,9 @@ def generate_images(text, width=256, height=256, steps=50, num_images=1, diversi
|
|
50 |
generated_images.append(img)
|
51 |
|
52 |
return generated_images
|
53 |
-
|
54 |
-
|
|
|
55 |
generated_images = []
|
56 |
for t in text:
|
57 |
generated_images.extend(generate_images(t))
|
|
|
26 |
model = snapshot_download(repo_id="akhaliq/frame-interpolation-film-style")
|
27 |
interpolator = interpolator.Interpolator(model, None)
|
28 |
|
29 |
+
|
30 |
def generate_story(choice, input_text):
|
31 |
query = "<BOS> <{0}> {1}".format(choice, input_text)
|
32 |
|
|
|
37 |
|
38 |
return generated_text
|
39 |
|
40 |
+
|
41 |
def generate_images(text, width=256, height=256, steps=50, num_images=1, diversity=4):
|
42 |
|
43 |
image_bytes = image_gen(text, steps, width, height, num_images, diversity)
|
|
|
52 |
generated_images.append(img)
|
53 |
|
54 |
return generated_images
|
55 |
+
|
56 |
+
|
57 |
+
def generate_interpolation(text, n=4):
|
58 |
generated_images = []
|
59 |
for t in text:
|
60 |
generated_images.extend(generate_images(t))
|