freddyaboulton HF Staff commited on
Commit
eddee7c
·
verified ·
1 Parent(s): 94876a9

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 -0
requirements.txt CHANGED
@@ -1,2 +1,2 @@
1
- gradio-client @ git+https://github.com/gradio-app/gradio@6533d38c29ee86823e58d94a8afedd219bcc9011#subdirectory=client/python
2
- https://gradio-pypi-previews.s3.amazonaws.com/6533d38c29ee86823e58d94a8afedd219bcc9011/gradio-6.5.1-py3-none-any.whl
 
1
+ gradio-client @ git+https://github.com/gradio-app/gradio@34ee825ae7111488655e68f983e45d55673455a2#subdirectory=client/python
2
+ https://gradio-pypi-previews.s3.amazonaws.com/34ee825ae7111488655e68f983e45d55673455a2/gradio-6.5.1-py3-none-any.whl
run.ipynb CHANGED
@@ -1 +1 @@
1
- {"cells": [{"cell_type": "markdown", "id": "302934307671667531413257853548643485645", "metadata": {}, "source": ["# Gradio Demo: theme_builder"]}, {"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": ["# Downloading files from the demo repo\n", "import os\n", "!wget -q https://github.com/gradio-app/gradio/raw/main/demo/theme_builder/custom_css.css"]}, {"cell_type": "code", "execution_count": null, "id": "44380577570523278879349135829904343037", "metadata": {}, "outputs": [], "source": ["import gradio as gr\n", "from gradio.themes.builder_app import demo\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch(css_paths=[\"demo/custom_css/custom_css.css\"], theme=gr.themes.Base(), head=\"<style id='theme_css'></style>\")\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5}
 
1
+ {"cells": [{"cell_type": "markdown", "id": "302934307671667531413257853548643485645", "metadata": {}, "source": ["# Gradio Demo: theme_builder"]}, {"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": ["# Downloading files from the demo repo\n", "import os\n", "!wget -q https://github.com/gradio-app/gradio/raw/main/demo/theme_builder/custom_css.css"]}, {"cell_type": "code", "execution_count": null, "id": "44380577570523278879349135829904343037", "metadata": {}, "outputs": [], "source": ["import gradio as gr\n", "from gradio.themes.builder_app import demo\n", "\n", "if __name__ == \"__main__\":\n", " from gradio.utils import get_space\n", " path = \"custom_css.css\" if get_space() else \"demo/custom_css/custom_css.css\"\n", " demo.launch(css_paths=[\"demo/custom_css/custom_css.css\"], theme=gr.themes.Base(), head=\"<style id='theme_css'></style>\")\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5}
run.py CHANGED
@@ -2,4 +2,6 @@ import gradio as gr
2
  from gradio.themes.builder_app import demo
3
 
4
  if __name__ == "__main__":
 
 
5
  demo.launch(css_paths=["demo/custom_css/custom_css.css"], theme=gr.themes.Base(), head="<style id='theme_css'></style>")
 
2
  from gradio.themes.builder_app import demo
3
 
4
  if __name__ == "__main__":
5
+ from gradio.utils import get_space
6
+ path = "custom_css.css" if get_space() else "demo/custom_css/custom_css.css"
7
  demo.launch(css_paths=["demo/custom_css/custom_css.css"], theme=gr.themes.Base(), head="<style id='theme_css'></style>")