File size: 271 Bytes
aa0eed8
48d337f
aa0eed8
 
 
48d337f
 
2efaa88
48d337f
aa0eed8
48d337f
1
2
3
4
5
6
7
8
9
10
11
import gradio as gr
import openai, os, time

client = openai.OpenAI(api_key = os.getenv("OPENAI_API_KEY"))

def chat(message, history):
    for i in range(len(message)):
        time.sleep(0.5)
        yield "You typed: " + message[: i+1]

gr.ChatInterface(chat).launch()