freddyaboulton HF Staff commited on
Commit
5fe3930
·
verified ·
1 Parent(s): 1b4682f

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 +2 -0
README.md CHANGED
@@ -5,7 +5,7 @@ emoji: 🔥
5
  colorFrom: indigo
6
  colorTo: indigo
7
  sdk: gradio
8
- sdk_version: 6.5.1
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.6.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: 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>")