freddyaboulton HF Staff commited on
Commit
800b57a
·
verified ·
1 Parent(s): fb81823

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@e2c316d1f8a032d9040f32d3e99b1b4a27cdc8b8#subdirectory=client/python
2
- https://gradio-pypi-previews.s3.amazonaws.com/e2c316d1f8a032d9040f32d3e99b1b4a27cdc8b8/gradio-6.1.0-py3-none-any.whl
 
1
+ gradio-client @ git+https://github.com/gradio-app/gradio@fac3844e01d6d648972ce7ac52302e7ad65034bd#subdirectory=client/python
2
+ https://gradio-pypi-previews.s3.amazonaws.com/fac3844e01d6d648972ce7ac52302e7ad65034bd/gradio-6.1.0-py3-none-any.whl
run.ipynb CHANGED
@@ -1 +1 @@
1
- {"cells": [{"cell_type": "markdown", "id": "302934307671667531413257853548643485645", "metadata": {}, "source": ["# Gradio Demo: copy_events"]}, {"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 gradio as gr\n", "\n", "md = \"This is **bold** text.\"\n", "\n", "def copy_callback(copy_data: gr.CopyData):\n", " return copy_data.value\n", "\n", "with gr.Blocks() as demo:\n", " textbox = gr.Textbox(label=\"Copied text\")\n", " with gr.Row():\n", " markdown = gr.Markdown(value=md, header_links=True, height=400, buttons=[\"copy\"])\n", " chatbot = gr.Chatbot([(\"Hello\", \"World\"), (\"Goodbye\", \"World\")], buttons=[\"copy\"])\n", " textbox2 = gr.Textbox(\"Write something here\", interactive=True, buttons=[\"copy\"])\n", "\n", " gr.on(\n", " [markdown.copy, chatbot.copy, textbox2.copy],\n", " copy_callback,\n", " outputs=textbox\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: copy_events"]}, {"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 gradio as gr\n", "\n", "md = \"This is **bold** text.\"\n", "\n", "def copy_callback(copy_data: gr.CopyData):\n", " return copy_data.value\n", "\n", "with gr.Blocks() as demo:\n", " textbox = gr.Textbox(label=\"Copied text\")\n", " with gr.Row():\n", " markdown = gr.Markdown(value=md, header_links=True, height=400, buttons=[\"copy\"])\n", " chatbot = gr.Chatbot([(\"Hello\", \"World\"), (\"Goodbye\", \"World\")], buttons=[\"copy\"]) # type: ignore\n", " textbox2 = gr.Textbox(\"Write something here\", interactive=True, buttons=[\"copy\"])\n", "\n", " gr.on(\n", " [markdown.copy, chatbot.copy, textbox2.copy],\n", " copy_callback,\n", " outputs=textbox\n", " )\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5}
run.py CHANGED
@@ -9,7 +9,7 @@ with gr.Blocks() as demo:
9
  textbox = gr.Textbox(label="Copied text")
10
  with gr.Row():
11
  markdown = gr.Markdown(value=md, header_links=True, height=400, buttons=["copy"])
12
- chatbot = gr.Chatbot([("Hello", "World"), ("Goodbye", "World")], buttons=["copy"])
13
  textbox2 = gr.Textbox("Write something here", interactive=True, buttons=["copy"])
14
 
15
  gr.on(
 
9
  textbox = gr.Textbox(label="Copied text")
10
  with gr.Row():
11
  markdown = gr.Markdown(value=md, header_links=True, height=400, buttons=["copy"])
12
+ chatbot = gr.Chatbot([("Hello", "World"), ("Goodbye", "World")], buttons=["copy"]) # type: ignore
13
  textbox2 = gr.Textbox("Write something here", interactive=True, buttons=["copy"])
14
 
15
  gr.on(