Spaces:
Running
Running
import gradio as gr | |
from geminisearch import webSearch | |
with gr.Blocks( | |
theme = "upsatwal/mlsc_tiet" | |
) as app: | |
gr.HTML("<div style='text-align:center;'><h1><strong>Gemini Web Search</strong></h1></div>") | |
gr.HTML("<div style='text-align:center;'><h3><strong>Search the web for information</strong></h3></div>") | |
with gr.Column(): | |
input = gr.Textbox(label="Query Field",placeholder="Type in your search query") | |
btn = gr.Button("Google Search") | |
gr.HTML("<div style='text-align:center;'><h3><strong>Google Search Result</strong></h3></div>") | |
output = gr.Markdown() | |
btn.click(webSearch, inputs=[input], outputs=output) | |
if __name__ == "__main__": | |
app.launch(mcp_server=True) |