Spaces:
Runtime error
Runtime error
alanchan808
commited on
Commit
•
27bf09a
1
Parent(s):
115129b
Update app.py
Browse files
app.py
CHANGED
@@ -52,9 +52,8 @@ def generate(question):
|
|
52 |
answer = ret['answer']
|
53 |
sources = ret['sources']
|
54 |
embed_video_html = ''
|
55 |
-
if sources is not None:
|
56 |
-
|
57 |
-
sources = [sources]
|
58 |
for source in sources:
|
59 |
embed_video_html += f'''
|
60 |
<iframe width="560" height="315" src="https://www.youtube.com/embed/{source}"
|
|
|
52 |
answer = ret['answer']
|
53 |
sources = ret['sources']
|
54 |
embed_video_html = ''
|
55 |
+
if sources is not None and len(sources) > 0:
|
56 |
+
sources = [s.strip() for s in sources.split(',')]
|
|
|
57 |
for source in sources:
|
58 |
embed_video_html += f'''
|
59 |
<iframe width="560" height="315" src="https://www.youtube.com/embed/{source}"
|