Muhammad Anas Akhtar
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,12 +6,6 @@ import scipy.io.wavfile as wavfile
|
|
| 6 |
# Use a pipeline as a high-level helper
|
| 7 |
from transformers import pipeline
|
| 8 |
|
| 9 |
-
# model_path = ("../Models/models--facebook--detr-resnet-50/snapshots"
|
| 10 |
-
# "/1d5f47bd3bdd2c4bbfa585418ffe6da5028b4c0b")
|
| 11 |
-
#
|
| 12 |
-
# tts_model_path = ("../Models/models--kakao-enterprise--vits-ljs/snapshots"
|
| 13 |
-
# "/3bcb8321394f671bd948ebf0d086d694dda95464")
|
| 14 |
-
|
| 15 |
|
| 16 |
narrator = pipeline("text-to-speech",
|
| 17 |
model="kakao-enterprise/vits-ljs")
|
|
@@ -136,7 +130,7 @@ def detect_object(image):
|
|
| 136 |
demo = gr.Interface(fn=detect_object,
|
| 137 |
inputs=[gr.Image(label="Select Image",type="pil")],
|
| 138 |
outputs=[gr.Image(label="Processed Image", type="pil"), gr.Audio(label="Generated Audio")],
|
| 139 |
-
title="
|
| 140 |
description="THIS APPLICATION WILL BE USED TO HIGHLIGHT OBJECTS AND GIVES AUDIO DESCRIPTION FOR THE PROVIDED INPUT IMAGE.")
|
| 141 |
demo.launch()
|
| 142 |
|
|
|
|
| 6 |
# Use a pipeline as a high-level helper
|
| 7 |
from transformers import pipeline
|
| 8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
narrator = pipeline("text-to-speech",
|
| 11 |
model="kakao-enterprise/vits-ljs")
|
|
|
|
| 130 |
demo = gr.Interface(fn=detect_object,
|
| 131 |
inputs=[gr.Image(label="Select Image",type="pil")],
|
| 132 |
outputs=[gr.Image(label="Processed Image", type="pil"), gr.Audio(label="Generated Audio")],
|
| 133 |
+
title="Object Detector with Audio",
|
| 134 |
description="THIS APPLICATION WILL BE USED TO HIGHLIGHT OBJECTS AND GIVES AUDIO DESCRIPTION FOR THE PROVIDED INPUT IMAGE.")
|
| 135 |
demo.launch()
|
| 136 |
|