test_chatinterface_examples_main / tuples_examples_testcase.py
freddyaboulton's picture
Upload folder using huggingface_hub
3bf10cf verified
raw
history blame
444 Bytes
import gradio as gr
def generate(
message: str,
chat_history: list[dict],
):
output = ""
for character in message:
output += character
yield output
demo = gr.ChatInterface(
fn=generate,
examples=[
["Hey"],
["Can you explain briefly to me what is the Python programming language?"],
],
cache_examples=False,
type="tuples",
)
if __name__ == "__main__":
demo.launch()