azamat commited on
Commit
4f00023
·
1 Parent(s): c9ef289
Files changed (1) hide show
  1. app.py +2 -6
app.py CHANGED
@@ -2,18 +2,14 @@ import gradio as gr
2
  from weaviate_explorer import WeaviateExplorer
3
 
4
  weaviate_explorer = WeaviateExplorer()
 
5
 
6
  def search(query, video_player):
7
  shorts = weaviate_explorer.explore(query)
8
  video_player.value = shorts[0]["link"]
9
  return video_player, "\n\n".join([f"{r['title']}\n{r['link']}" for r in shorts])
10
 
11
- video_player = gr.Video(label="Search Results")
12
-
13
  iface = gr.Interface(fn=search,
14
  inputs="text",
15
- outputs=[
16
- video_player,
17
- "text"
18
- ])
19
  iface.launch()
 
2
  from weaviate_explorer import WeaviateExplorer
3
 
4
  weaviate_explorer = WeaviateExplorer()
5
+ video_player = gr.Video(label="Search Results")
6
 
7
  def search(query, video_player):
8
  shorts = weaviate_explorer.explore(query)
9
  video_player.value = shorts[0]["link"]
10
  return video_player, "\n\n".join([f"{r['title']}\n{r['link']}" for r in shorts])
11
 
 
 
12
  iface = gr.Interface(fn=search,
13
  inputs="text",
14
+ outputs=[video_player, "text"])
 
 
 
15
  iface.launch()