Spaces:
Sleeping
Sleeping
Tets
Browse files
app.py
CHANGED
@@ -5,7 +5,12 @@ weaviate_explorer = WeaviateExplorer()
|
|
5 |
|
6 |
def search(query):
|
7 |
shorts = weaviate_explorer.explore(query)
|
8 |
-
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
-
iface = gr.Interface(fn=search, inputs="text", outputs="text")
|
11 |
iface.launch()
|
|
|
5 |
|
6 |
def search(query):
|
7 |
shorts = weaviate_explorer.explore(query)
|
8 |
+
# Display the first video
|
9 |
+
first_video = gr.outputs.Video(shorts[0]["link"])
|
10 |
+
# Display the list of URLs
|
11 |
+
# other_videos = [gr.outputs.Text(url) for url in video_urls[1:]]
|
12 |
+
return first_video, "\n\n".join([f"{r['title']}\n{r['link']}" for r in shorts])
|
13 |
+
# return
|
14 |
|
15 |
+
iface = gr.Interface(fn=search, inputs="text", outputs=["video", "text"])
|
16 |
iface.launch()
|