Rahatara commited on
Commit
9b83ad3
·
verified ·
1 Parent(s): 985a108

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -34,13 +34,16 @@ def google_search_query(question, use_web_search):
34
  return f"Error: {str(e)}", ""
35
 
36
  # Gradio Interface using Chatbot and conditional web search
37
- with gr.Blocks() as app:
 
 
 
 
38
  with gr.Row():
39
  question_input = gr.Textbox(lines=2, label="Ask a Question")
40
  web_search_checkbox = gr.Checkbox(label="Enhance with Web Search", value=False)
41
- with gr.Row():
42
  submit_button = gr.Button("Submit")
43
- chatbot = gr.Chatbot(label="Chatbot Responses")
44
 
45
  def update_chatbot(question, use_web_search, chat_log):
46
  ai_response, search_results = google_search_query(question, use_web_search)
 
34
  return f"Error: {str(e)}", ""
35
 
36
  # Gradio Interface using Chatbot and conditional web search
37
+ with gr.Blocks(theme=gr.themes.Glass(primary_hue = "violet")) as app:
38
+ gr.Markdown("# Gemini 2.0 Google Search Custom UI")
39
+
40
+ with gr.Row():
41
+ chatbot = gr.Chatbot(label="Chatbot Responses")
42
  with gr.Row():
43
  question_input = gr.Textbox(lines=2, label="Ask a Question")
44
  web_search_checkbox = gr.Checkbox(label="Enhance with Web Search", value=False)
45
+ with gr.Row():
46
  submit_button = gr.Button("Submit")
 
47
 
48
  def update_chatbot(question, use_web_search, chat_log):
49
  ai_response, search_results = google_search_query(question, use_web_search)