Spaces:
Build error
Build error
Commit ·
af23863
1
Parent(s): 9109130
Upload folder using huggingface_hub
Browse files123456789101112---title: Chatinterface Streaming Echoemoji: 💻colorFrom: graycolorTo: graysdk: gradiosdk_version: 3.37.0app_file: app.pypinned: false---Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference1234567891011---title: chatinterface_streaming_echoemoji: 🔥colorFrom: indigocolorTo: indigosdk: gradiosdk_version: 3.37.0app_file: run.pypinned: false---
1{"cells": [{"cell_type": "markdown", "id": 302934307671667531413257853548643485645, "metadata": {}, "source": ["# Gradio Demo: chatinterface_streaming_echo"]}, {"cell_type": "code", "execution_count": null, "id": 272996653310673477252411125948039410165, "metadata": {}, "outputs": [], "source": ["!pip install -q gradio "]}, {"cell_type": "code", "execution_count": null, "id": 288918539441861185822528903084949547379, "metadata": {}, "outputs": [], "source": ["import time\n", "import gradio as gr\n", "\n", "def slow_echo(message, history):\n", " for i in range(len(message)):\n", " time.sleep(0.05)\n", " yield \"You typed: \" + message[: i+1]\n", "\n", "demo = gr.ChatInterface(slow_echo).queue()\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5}123456789101112import timeimport 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).queue()
if __name__ == "__main__": demo.launch()README.md+6-7
run.ipynbAdded+1
run.pyAdded+12