LLaVa-Chat-2 / app.py
Satyam-Singh's picture
Update app.py
b55c56b
raw
history blame contribute delete
663 Bytes
import google.generativeai as genai
import gradio as gr
import os
genai.configure(api_key=os.getenv("k"))
def generate(prompt, history):
response = genai.chat(
messages=prompt)
return response.last
llava=gr.ChatInterface(
fn=generate,
chatbot=gr.Chatbot(show_label=False, avatar_images=(None, 'llava-logo.svg'), show_share_button=False, show_copy_button=True, likeable=True, layout="panel"),
title="LLaVa-2",
description="This Is Official Demo Of ```LLaVa-2```. ```History/context``` memory does not work in this demo",
concurrency_limit=20,#layout="vertical",#bubble_full_width=False
)
llava.launch(share=True,show_api=False)