Spaces:
Runtime error
Runtime error
waheedwaqar
commited on
Commit
·
2791e4d
1
Parent(s):
143d487
Update app.py
Browse files
app.py
CHANGED
@@ -122,12 +122,13 @@ with gr.Blocks() as demo:
|
|
122 |
if model_year:
|
123 |
model_year = model_year.group()
|
124 |
|
125 |
-
video_link = f"Source: {output['input_documents'][0].metadata['video_link']}"
|
126 |
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
|
|
|
|
131 |
|
132 |
|
133 |
output_text_with_images = f"{output_text}<br>{images_html}{video_link}"
|
|
|
122 |
if model_year:
|
123 |
model_year = model_year.group()
|
124 |
|
|
|
125 |
|
126 |
+
video_link = f"Source: {output['input_documents'][0].metadata['video_link']}"
|
127 |
+
if model_year is not None:
|
128 |
+
for i in range(0,len(output['input_documents'])):
|
129 |
+
if model_year in output['input_documents'][i].metadata['title']:
|
130 |
+
video_link = f"Source: {output['input_documents'][i].metadata['video_link']}"
|
131 |
+
break
|
132 |
|
133 |
|
134 |
output_text_with_images = f"{output_text}<br>{images_html}{video_link}"
|