LLaVa-Chat-2 / app.py
Satyam-Singh's picture
Create app.py
4e07148
raw
history blame
No virus
634 Bytes
import google.generativeai as genai
import gradio as gr
import os
genai.configure(api_key=os.getenv("GOOGLE_PALM_KEY"))
def generate(prompt, history):
response = genai.chat(
messages=prompt)
return response.last
gr.ChatInterface(
fn=generate,
chatbot=gr.Chatbot(show_label=False, avatar_images=(None, 'palm-logo.png'), show_share_button=False, show_copy_button=True, likeable=True, layout="panel"),
title="PaLM-2",
description="This Is Official Demo Of ```PaLM-2``` Based On ```Google API```. ```History/context``` memory does not work in this demo",
concurrency_limit=20,
).launch(show_api=False)