Update app.py
Browse files
app.py
CHANGED
|
@@ -32,10 +32,6 @@ def generate_audio(text):
|
|
| 32 |
# Return the path to the saved output WAV file
|
| 33 |
return "finetuned_output.wav"
|
| 34 |
|
| 35 |
-
# Could you please write me a python code that will take list of detection object as an input and it will give the response that will include all the objects (labels) provided in the input. For example if the input is like this: [{'score': 0.9996405839920044, 'label': 'person', 'box': {'xmin': 435, 'ymin': 282, 'xmax': 636, 'ymax': 927}}, {'score': 0.9995879530906677, 'label': 'dog', 'box': {'xmin': 570, 'ymin': 694, 'xmax': 833, 'ymax': 946}}]
|
| 36 |
-
# The output should be, This pictuture contains 1 person and 1 dog. If there are multiple objects, do not add 'and' between every objects but 'and' should be at the end only
|
| 37 |
-
|
| 38 |
-
|
| 39 |
def read_objects(detection_objects):
|
| 40 |
# Initialize counters for each object label
|
| 41 |
object_counts = {}
|
|
|
|
| 32 |
# Return the path to the saved output WAV file
|
| 33 |
return "finetuned_output.wav"
|
| 34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
def read_objects(detection_objects):
|
| 36 |
# Initialize counters for each object label
|
| 37 |
object_counts = {}
|