Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,8 @@ import random
|
|
13 |
script_generator = pipeline("text-generation", model="gpt2", truncation=True, max_length=100)
|
14 |
image_generator = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", torch_dtype=torch.float16).to("cpu")
|
15 |
# For example, use a specific available model if MusicGen isn't accessible
|
16 |
-
music_generator = pipeline("text-to-
|
|
|
17 |
|
18 |
|
19 |
# Generate Comedy Script
|
@@ -28,6 +29,7 @@ def text_to_speech(script):
|
|
28 |
tts.save(audio_file)
|
29 |
return audio_file
|
30 |
|
|
|
31 |
# Create Images Using Stable Diffusion
|
32 |
def create_images_from_script(script):
|
33 |
lines = script.split('. ')
|
|
|
13 |
script_generator = pipeline("text-generation", model="gpt2", truncation=True, max_length=100)
|
14 |
image_generator = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", torch_dtype=torch.float16).to("cpu")
|
15 |
# For example, use a specific available model if MusicGen isn't accessible
|
16 |
+
music_generator = pipeline("text-to-audio", model="facebook/musicgen-melody", device="cpu")
|
17 |
+
|
18 |
|
19 |
|
20 |
# Generate Comedy Script
|
|
|
29 |
tts.save(audio_file)
|
30 |
return audio_file
|
31 |
|
32 |
+
|
33 |
# Create Images Using Stable Diffusion
|
34 |
def create_images_from_script(script):
|
35 |
lines = script.split('. ')
|