update
Browse files
app.py
CHANGED
@@ -86,15 +86,21 @@ def get_files_infos(files):
|
|
86 |
|
87 |
def get_completion(prompt, files_info, top_p, temperature):
|
88 |
# Create table header
|
89 |
-
files_info_string = "| Type | Name | Dimensions | Duration | Audio |\n"
|
90 |
files_info_string += "|------|------|------------|-----------|--------|\n"
|
91 |
-
|
92 |
# Add each file as a table row
|
93 |
for file_info in files_info:
|
94 |
dimensions = file_info.get("dimensions", "-")
|
95 |
-
duration =
|
96 |
-
|
97 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
files_info_string += f"| {file_info['type']} | {file_info['name']} | {dimensions} | {duration} | {audio} |\n"
|
99 |
|
100 |
messages = [
|
|
|
86 |
|
87 |
def get_completion(prompt, files_info, top_p, temperature):
|
88 |
# Create table header
|
89 |
+
files_info_string = "| Type | Name | Dimensions | Duration | Audio Channels |\n"
|
90 |
files_info_string += "|------|------|------------|-----------|--------|\n"
|
91 |
+
|
92 |
# Add each file as a table row
|
93 |
for file_info in files_info:
|
94 |
dimensions = file_info.get("dimensions", "-")
|
95 |
+
duration = (
|
96 |
+
f"{file_info.get('duration', '-')}s" if "duration" in file_info else "-"
|
97 |
+
)
|
98 |
+
audio = (
|
99 |
+
f"{file_info.get('audio_channels', '-')} channels"
|
100 |
+
if "audio_channels" in file_info
|
101 |
+
else "-"
|
102 |
+
)
|
103 |
+
|
104 |
files_info_string += f"| {file_info['type']} | {file_info['name']} | {dimensions} | {duration} | {audio} |\n"
|
105 |
|
106 |
messages = [
|