File size: 608 Bytes
4e07148
 
 
 
f3fa29d
4e07148
 
 
 
 
 
 
 
 
 
f3fa29d
 
 
4e07148
650c62a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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


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,
).launch(share=True,show_api=False)