File size: 709 Bytes
345eb49
 
 
7c44ac0
 
 
3d4cf4e
 
7c44ac0
 
 
3d4cf4e
6d092d5
7c44ac0
 
345eb49
 
7c44ac0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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)