Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| import importlib | |
| BrightDataSearchTool = importlib.import_module("tool").BrightDataSearchTool | |
| tool = BrightDataSearchTool() | |
| def run(query, engine): | |
| return tool(query=query, engine=engine) | |
| with gr.Blocks() as demo: | |
| gr.Markdown("### Bright Data search") | |
| query = gr.Textbox(label="Query") | |
| engine = gr.Dropdown(choices=['google', 'bing', 'yandex'], label="Engine", value="google") | |
| run_btn = gr.Button("Run") | |
| output = gr.Textbox(label="Output", lines=12) | |
| run_btn.click(run, inputs=[query, engine], outputs=output) | |
| demo.launch() | |