bstraehle's picture
Update app.py
48d337f verified
raw
history blame
271 Bytes
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.3)
yield "You typed: " + message[: i+1]
gr.ChatInterface(chat).launch()