Spaces:
Sleeping
Sleeping
File size: 487 Bytes
a20be5b 4f00023 a20be5b dd15546 a20be5b c9ef289 a20be5b c9ef289 4f00023 a20be5b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import gradio as gr
from weaviate_explorer import WeaviateExplorer
weaviate_explorer = WeaviateExplorer()
video_player = gr.Video(label="Search Results")
def search(query):
shorts = weaviate_explorer.explore(query)
video_player.value = shorts[0]["link"]
return video_player, "\n\n".join([f"{r['title']}\n{r['link']}" for r in shorts])
iface = gr.Interface(fn=search,
inputs="text",
outputs=[video_player, "text"])
iface.launch() |