MediaSearch / app.py
azamat's picture
Init
a20be5b
raw
history blame
322 Bytes
import gradio as gr
from weaviate_explorer import WeaviateExplorer
weaviate_explorer = WeaviateExplorer()
def search(query):
shorts = weaviate_explorer.explore(query)
return "\n\n".join([f"{r['title']}\n{r['link']}" for r in shorts])
iface = gr.Interface(fn=search, inputs="text", outputs="text")
iface.launch()