hamel commited on
Commit
9703f29
1 Parent(s): d19abb4

Add application files

Browse files
Files changed (3) hide show
  1. README.md +4 -0
  2. app.ipynb +5 -1
  3. app.md +4 -0
README.md CHANGED
@@ -14,6 +14,8 @@ license: mit
14
 
15
  > A demo of using nbdev with Hugging Face Spaces & Gradio
16
 
 
 
17
  ## 1. Create a Gradio-enabled Space on Hugging Face
18
 
19
  The first step is to create a space and select the appropriate sdk (which is Gradio in this example), per [these instructions](https://huggingface.co/docs/hub/spaces-overview#creating-a-new-space):
@@ -165,6 +167,8 @@ You must supply a requirements.txt file so the Gradio app knows how to build you
165
 
166
  fastcore
167
 
 
 
168
  ## 4. Launch Your Gradio App
169
 
170
  To launch your gradio app, you need to commit the changes to the Hugging Face repo:
 
14
 
15
  > A demo of using nbdev with Hugging Face Spaces & Gradio
16
 
17
+ [Hugging Face Spaces](https://huggingface.co/spaces/launch) provides an easy ways to deploy a web app with python. [Gradio](https://gradio.app/) is one of my favorite tools for building these web apps. Gradio allows you to prototype your web apps in notebooks, which allow you to iterate really fast. However, Hugging Face Spaces requires you to package your web application code as a python script named `app.py`. **In the below tutorial, we show you how you can use `nbdev` to auto-generate this app directly from a notebook, so you don't have to waste time refactoring code!**
18
+
19
  ## 1. Create a Gradio-enabled Space on Hugging Face
20
 
21
  The first step is to create a space and select the appropriate sdk (which is Gradio in this example), per [these instructions](https://huggingface.co/docs/hub/spaces-overview#creating-a-new-space):
 
167
 
168
  fastcore
169
 
170
+ _Note: you may want to add operating system dependencies in addition to python dependencies. You can do this via a `packages.txt` file as [documented here](https://huggingface.co/docs/hub/spaces-dependencies#adding-your-own-dependencies)._
171
+
172
  ## 4. Launch Your Gradio App
173
 
174
  To launch your gradio app, you need to commit the changes to the Hugging Face repo:
app.ipynb CHANGED
@@ -7,7 +7,9 @@
7
  "source": [
8
  "# Hugging Face Spaces From A Notebook\n",
9
  "\n",
10
- "> A demo of using nbdev with Hugging Face Spaces & Gradio"
 
 
11
  ]
12
  },
13
  {
@@ -337,6 +339,8 @@
337
  "id": "f15d9c78-1f55-449e-8058-9af1832367a0",
338
  "metadata": {},
339
  "source": [
 
 
340
  "## 4. Launch Your Gradio App\n",
341
  "\n",
342
  "To launch your gradio app, you need to commit the changes to the Hugging Face repo:\n",
 
7
  "source": [
8
  "# Hugging Face Spaces From A Notebook\n",
9
  "\n",
10
+ "> A demo of using nbdev with Hugging Face Spaces & Gradio\n",
11
+ "\n",
12
+ "[Hugging Face Spaces](https://huggingface.co/spaces/launch) provides an easy ways to deploy a web app with python. [Gradio](https://gradio.app/) is one of my favorite tools for building these web apps. Gradio allows you to prototype your web apps in notebooks, which allow you to iterate really fast. However, Hugging Face Spaces requires you to package your web application code as a python script named `app.py`. **In the below tutorial, we show you how you can use `nbdev` to auto-generate this app directly from a notebook, so you don't have to waste time refactoring code!**"
13
  ]
14
  },
15
  {
 
339
  "id": "f15d9c78-1f55-449e-8058-9af1832367a0",
340
  "metadata": {},
341
  "source": [
342
+ "_Note: you may want to add operating system dependencies in addition to python dependencies. You can do this via a `packages.txt` file as [documented here](https://huggingface.co/docs/hub/spaces-dependencies#adding-your-own-dependencies)._\n",
343
+ "\n",
344
  "## 4. Launch Your Gradio App\n",
345
  "\n",
346
  "To launch your gradio app, you need to commit the changes to the Hugging Face repo:\n",
app.md CHANGED
@@ -2,6 +2,8 @@
2
 
3
  > A demo of using nbdev with Hugging Face Spaces & Gradio
4
 
 
 
5
  ## 1. Create a Gradio-enabled Space on Hugging Face
6
 
7
  The first step is to create a space and select the appropriate sdk (which is Gradio in this example), per [these instructions](https://huggingface.co/docs/hub/spaces-overview#creating-a-new-space):
@@ -153,6 +155,8 @@ You must supply a requirements.txt file so the Gradio app knows how to build you
153
 
154
  fastcore
155
 
 
 
156
  ## 4. Launch Your Gradio App
157
 
158
  To launch your gradio app, you need to commit the changes to the Hugging Face repo:
 
2
 
3
  > A demo of using nbdev with Hugging Face Spaces & Gradio
4
 
5
+ [Hugging Face Spaces](https://huggingface.co/spaces/launch) provides an easy ways to deploy a web app with python. [Gradio](https://gradio.app/) is one of my favorite tools for building these web apps. Gradio allows you to prototype your web apps in notebooks, which allow you to iterate really fast. However, Hugging Face Spaces requires you to package your web application code as a python script named `app.py`. **In the below tutorial, we show you how you can use `nbdev` to auto-generate this app directly from a notebook, so you don't have to waste time refactoring code!**
6
+
7
  ## 1. Create a Gradio-enabled Space on Hugging Face
8
 
9
  The first step is to create a space and select the appropriate sdk (which is Gradio in this example), per [these instructions](https://huggingface.co/docs/hub/spaces-overview#creating-a-new-space):
 
155
 
156
  fastcore
157
 
158
+ _Note: you may want to add operating system dependencies in addition to python dependencies. You can do this via a `packages.txt` file as [documented here](https://huggingface.co/docs/hub/spaces-dependencies#adding-your-own-dependencies)._
159
+
160
  ## 4. Launch Your Gradio App
161
 
162
  To launch your gradio app, you need to commit the changes to the Hugging Face repo: