File size: 663 Bytes
4e07148
 
 
 
f3fa29d
4e07148
 
 
 
 
 
 
 
7386ab8
4877bc5
173212d
f3fa29d
 
4f336d2
7386ab8
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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)