Spaces:
Runtime error
Runtime error
File size: 632 Bytes
a4f154b d36aee0 a4f154b d36aee0 1376587 a4f154b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
import time
import gradio as gr
def slow_echo(message, history):
for i in range(len(message)):
time.sleep(0.05)
yield "You typed: " + message[: i+1]
demo = gr.ChatInterface(
slow_echo,
chatbot=gr.Chatbot(height=300),
textbox=gr.Textbox(placeholder="Try Pragna SFT", container=False, scale=7),
title="pragna-1b-it",
description="This is pragna-1b-it",
theme="soft",
examples=["Hello", "Am I cool?", "Are tomatoes vegetables?"],
cache_examples=True,
retry_btn=None,
undo_btn="Delete Previous",
clear_btn="Clear",
).queue()
if __name__ == "__main__":
demo.launch() |