import gradio as gr import os os.system('pip install google-generativeai') import google.generativeai as palm palm.configure(api_key=os.environ.get('API_Key')) def palm2chat(message, history): response = palm.chat(messages=[message]) return response.last demo = gr.ChatInterface(fn=palm2chat).queue() demo.launch()