bstraehle's picture
Update app.py
2efaa88 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.5)
yield "You typed: " + message[: i+1]
gr.ChatInterface(chat).launch()