import gradio as gr import bardapi # Set your Secure-1PSID value to key token = 'cQjDrFOQjkhOHHHCW54Tc7IKyphnqos-A-IpmgjVa9p3_ZFFa5Ilet-heMO8Xm3TM1Y5vw.' def get_answer(input_text): # Send an API request and get a response. response = bardapi.core.Bard(token).get_answer(input_text) return response # Create a Gradio interface iface = gr.Interface( fn=get_answer, inputs=gr.inputs.Textbox(lines=2, placeholder="Enter your input text"), outputs="text") # Run the interface iface.launch()