freddyaboulton HF Staff commited on
Commit
7f7c247
·
verified ·
1 Parent(s): 5b95dc4

Upload folder using huggingface_hub

Browse files
Files changed (3) hide show
  1. README.md +1 -1
  2. run.ipynb +1 -1
  3. run.py +1 -1
README.md CHANGED
@@ -5,7 +5,7 @@ emoji: 🔥
5
  colorFrom: indigo
6
  colorTo: indigo
7
  sdk: gradio
8
- sdk_version: 6.1.0
9
  app_file: run.py
10
  pinned: false
11
  hf_oauth: true
 
5
  colorFrom: indigo
6
  colorTo: indigo
7
  sdk: gradio
8
+ sdk_version: 6.2.0
9
  app_file: run.py
10
  pinned: false
11
  hf_oauth: true
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(