freddyaboulton HF Staff commited on
Commit
b4ba425
·
verified ·
1 Parent(s): 8de0253

Upload folder using huggingface_hub

Browse files
Files changed (3) hide show
  1. requirements.txt +2 -2
  2. run.ipynb +1 -1
  3. run.py +1 -1
requirements.txt CHANGED
@@ -1,2 +1,2 @@
1
- gradio-client @ git+https://github.com/gradio-app/gradio@890eaa3a9e53dab5bcb16c5d017ae0470109b8fb#subdirectory=client/python
2
- https://gradio-pypi-previews.s3.amazonaws.com/890eaa3a9e53dab5bcb16c5d017ae0470109b8fb/gradio-5.9.1-py3-none-any.whl
 
1
+ gradio-client @ git+https://github.com/gradio-app/gradio@f2bd72f9ef23552f0c6018396320eca9baef04f5#subdirectory=client/python
2
+ https://gradio-pypi-previews.s3.amazonaws.com/f2bd72f9ef23552f0c6018396320eca9baef04f5/gradio-5.9.1-py3-none-any.whl
run.ipynb CHANGED
@@ -1 +1 @@
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(\n", " slow_echo,\n", " type=\"messages\",\n", " flagging_mode=\"manual\",\n", " flagging_options=[\"Like\", \"Spam\", \"Inappropriate\", \"Other\"], \n", " save_history=True,\n", ")\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5}
 
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(\n", " slow_echo,\n", " type=\"messages\",\n", " flagging_mode=\"manual\",\n", " flagging_options=[\"Like\", \"Spam\", \"Inappropriate\", \"Other\"],\n", " save_history=True,\n", ")\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5}
run.py CHANGED
@@ -10,7 +10,7 @@ demo = gr.ChatInterface(
10
  slow_echo,
11
  type="messages",
12
  flagging_mode="manual",
13
- flagging_options=["Like", "Spam", "Inappropriate", "Other"],
14
  save_history=True,
15
  )
16
 
 
10
  slow_echo,
11
  type="messages",
12
  flagging_mode="manual",
13
+ flagging_options=["Like", "Spam", "Inappropriate", "Other"],
14
  save_history=True,
15
  )
16