freddyaboulton HF staff commited on
Commit
ab7ddc1
·
verified ·
1 Parent(s): a87ce5b

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 +2 -1
requirements.txt CHANGED
@@ -1,2 +1,2 @@
1
- gradio-client @ git+https://github.com/gradio-app/gradio@2b7ba4801398b6dd6b72496ea50245a0cd6852d6#subdirectory=client/python
2
- https://gradio-pypi-previews.s3.amazonaws.com/2b7ba4801398b6dd6b72496ea50245a0cd6852d6/gradio-5.12.0-py3-none-any.whl
 
1
+ gradio-client @ git+https://github.com/gradio-app/gradio@96bbde277e059f79bb2c9898576050e84dab147a#subdirectory=client/python
2
+ https://gradio-pypi-previews.s3.amazonaws.com/96bbde277e059f79bb2c9898576050e84dab147a/gradio-5.12.0-py3-none-any.whl
run.ipynb CHANGED
@@ -1 +1 @@
1
- {"cells": [{"cell_type": "markdown", "id": "302934307671667531413257853548643485645", "metadata": {}, "source": ["# Gradio Demo: tabbed_interface_lite"]}, {"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", "hello_world = gr.Interface(lambda name: \"Hello \" + name, \"text\", \"text\")\n", "bye_world = gr.Interface(lambda name: \"Bye \" + name, \"text\", \"text\")\n", "\n", "demo = gr.TabbedInterface([hello_world, bye_world], [\"Hello World\", \"Bye World\"])\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: tabbed_interface_lite"]}, {"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", "hello_world = gr.Interface(lambda name: \"Hello \" + name, \"text\", \"text\")\n", "bye_world = gr.Interface(lambda name: \"Bye \" + name, \"text\", \"text\")\n", "chat = gr.ChatInterface(lambda *args: \"Hello \" + args[0])\n", "\n", "demo = gr.TabbedInterface([hello_world, bye_world, chat], [\"Hello World\", \"Bye World\", \"Chat\"])\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5}
run.py CHANGED
@@ -2,8 +2,9 @@ import gradio as gr
2
 
3
  hello_world = gr.Interface(lambda name: "Hello " + name, "text", "text")
4
  bye_world = gr.Interface(lambda name: "Bye " + name, "text", "text")
 
5
 
6
- demo = gr.TabbedInterface([hello_world, bye_world], ["Hello World", "Bye World"])
7
 
8
  if __name__ == "__main__":
9
  demo.launch()
 
2
 
3
  hello_world = gr.Interface(lambda name: "Hello " + name, "text", "text")
4
  bye_world = gr.Interface(lambda name: "Bye " + name, "text", "text")
5
+ chat = gr.ChatInterface(lambda *args: "Hello " + args[0])
6
 
7
+ demo = gr.TabbedInterface([hello_world, bye_world, chat], ["Hello World", "Bye World", "Chat"])
8
 
9
  if __name__ == "__main__":
10
  demo.launch()