azamat commited on
Commit
d867b65
·
1 Parent(s): a20be5b
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -5,7 +5,12 @@ weaviate_explorer = WeaviateExplorer()
5
 
6
  def search(query):
7
  shorts = weaviate_explorer.explore(query)
8
- return "\n\n".join([f"{r['title']}\n{r['link']}" for r in shorts])
 
 
 
 
 
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()