Update app.py
Browse files
app.py
CHANGED
|
@@ -16,10 +16,10 @@ from transformers import pipeline
|
|
| 16 |
|
| 17 |
device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')
|
| 18 |
|
| 19 |
-
narrator = pipeline("text-to-speech", model="
|
| 20 |
|
| 21 |
# Load the pretrained weights
|
| 22 |
-
caption_image = pipeline("image-to-text", model="Salesforce/blip-image-captioning-
|
| 23 |
|
| 24 |
|
| 25 |
# Define the function to generate audio from text
|
|
|
|
| 16 |
|
| 17 |
device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')
|
| 18 |
|
| 19 |
+
narrator = pipeline("text-to-speech", model="facebook/mms-tts-en")
|
| 20 |
|
| 21 |
# Load the pretrained weights
|
| 22 |
+
caption_image = pipeline("image-to-text", model="Salesforce/blip-image-captioning-base")
|
| 23 |
|
| 24 |
|
| 25 |
# Define the function to generate audio from text
|