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()