Spaces:
Sleeping
Sleeping
Add title
Browse files
app.py
CHANGED
@@ -33,19 +33,19 @@ def search(query):
|
|
33 |
download_url = f"https://drive.google.com/uc?id={shorts[0]['link'].split('/')[-2]}"
|
34 |
video_path = gdown.download(download_url, output=f"./video.mp4")
|
35 |
|
36 |
-
return
|
37 |
|
38 |
# title = "<center>Slideo based on YCombinator</center>"
|
39 |
# description = "Enter a search query, question or topic to receive the top 5 most relevant short video answers. The most relevant clip will be displayed separately, and it will also be included in the list of top 5 video titles with links to Google Drive."
|
40 |
|
41 |
input_text = gr.Textbox(placeholder = "Your query, question, topic, ...", label = "Query")
|
42 |
|
|
|
43 |
video = gr.Video(label = "Most relevant clip")
|
44 |
-
# output_text = gr.Markdown(label = "Top-5 relevants clips")
|
45 |
|
46 |
iface = gr.Interface(fn=search,
|
47 |
inputs=input_text,
|
48 |
-
outputs=[video],
|
49 |
# outputs=[video, output_text],
|
50 |
# title=title,
|
51 |
# description=description,
|
|
|
33 |
download_url = f"https://drive.google.com/uc?id={shorts[0]['link'].split('/')[-2]}"
|
34 |
video_path = gdown.download(download_url, output=f"./video.mp4")
|
35 |
|
36 |
+
return shorts[0]['title'], video_path #, "\n\n".join([f"- [{r['title']}]({r['link']})" for r in shorts])
|
37 |
|
38 |
# title = "<center>Slideo based on YCombinator</center>"
|
39 |
# description = "Enter a search query, question or topic to receive the top 5 most relevant short video answers. The most relevant clip will be displayed separately, and it will also be included in the list of top 5 video titles with links to Google Drive."
|
40 |
|
41 |
input_text = gr.Textbox(placeholder = "Your query, question, topic, ...", label = "Query")
|
42 |
|
43 |
+
title = gr.Markdown()
|
44 |
video = gr.Video(label = "Most relevant clip")
|
|
|
45 |
|
46 |
iface = gr.Interface(fn=search,
|
47 |
inputs=input_text,
|
48 |
+
outputs=[title, video],
|
49 |
# outputs=[video, output_text],
|
50 |
# title=title,
|
51 |
# description=description,
|