palm2chat / app.py
gnumanth's picture
chore: pip install maybe?
17b785d
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()