Buckets:

download
raw
703 Bytes
import gradio as gr
import random
import time
with gr.Blocks() as demo:
chatbot = gr.Chatbot()
msg = gr.Textbox()
clear = gr.Button("Clear")
def user(user_message, history):
return "", history + [{"role": "user", "content": user_message}]
def bot(history):
bot_message = random.choice(["How are you?", "I love you", "I'm very hungry"])
time.sleep(2)
history.append({"role": "assistant", "content": bot_message})
return history
msg.submit(user, [msg, chatbot], [msg, chatbot], queue=False).then(
bot, chatbot, chatbot
)
clear.click(lambda: None, None, chatbot, queue=False)
if __name__ == "__main__":
demo.launch()

Xet Storage Details

Size:
703 Bytes
·
Xet hash:
a08536c5f99147a6885bc99ac2b016174ae23aec495d8f6b224fdbfdfe4900fd

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.