Ifeanyi commited on
Commit
7c44ac0
·
verified ·
1 Parent(s): b3a08f3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -10
app.py CHANGED
@@ -1,15 +1,18 @@
1
  import gradio as gr
2
  from geminisearch import webSearch
3
 
4
- app = gr.ChatInterface(webSearch,
5
- chatbot=gr.Chatbot(height=400),
6
- type = "messages",
7
- textbox=gr.Textbox(placeholder="Chat the web", container=False, scale=7),
8
- title="Gemini Web Chat",
9
- theme="upsatwal/mlsc_tiet",
10
- examples=["What is the current weather in Paris",
11
- "What is the current exchange rate between USD and EUR",
12
- "What is the current price of Bitcoin"])
 
 
 
13
 
14
  if __name__ == "__main__":
15
- app.launch(mcp_server=True)
 
1
  import gradio as gr
2
  from geminisearch import webSearch
3
 
4
+ with gr.Blocks(
5
+ theme = "upsatwal/mlsc_tiet"
6
+ ) as app:
7
+ gr.Markdown("<center><h1><strong>Gemini Web Search</strong></h1></center>")
8
+ gr.Markdown("<center><h3><strong>Search the web for information</strong></h3></center>")
9
+ with gr.Column():
10
+ gr.Markdown("<strong>Query Response</strong>")
11
+ output = gr.Markdown()
12
+ input = gr.Textbox(label="Query Field",placeholder="Type in your search query")
13
+ btn = gr.Button("Google Search")
14
+
15
+ btn.click(webSearch, inputs=[input], outputs=output)
16
 
17
  if __name__ == "__main__":
18
+ app.launch(mcp_server=True)