TavilyWebSearch / app.py
hgdgng's picture
Create app.py
b9bfc9e verified
raw
history blame
477 Bytes
import gradio as gr
import os
from src.search import perform_search
def search_interface(query):
return perform_search(query)
# Create Gradio interface
interface = gr.Interface(
fn=search_interface,
inputs=gr.Textbox(label="Enter your search query", lines=2),
outputs=gr.Textbox(label="Answer"),
title="Tavily Search Assistant",
description="Enter any question to get an AI-powered search response"
)
if __name__ == "__main__":
interface.launch()