Skip to content

Commit 0f6210c

Browse files
committed
fix nits
1 parent 0f9fda1 commit 0f6210c

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

nbs/blog/posts/2022-11-07-spaces/index.qmd

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,10 @@ skip_exec: true
99
skip_showdoc: true
1010
---
1111

12-
:::{.hide}
13-
[^1]
14-
:::
15-
1612
![Image created with Stable Diffusion from [this space](https://huggingface.co/spaces/stabilityai/stable-diffusion)](blog_cover.jpeg)
1713

1814

19-
[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 also, allows you to prototype your web apps in notebooks which allow you to iterate fast. Unfortunately, Hugging Face Spaces requires you to package your web application code as a python script named `app.py`.
15+
[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. For example, the cover-image for this blog post was generated with a [Gradio App]((https://huggingface.co/spaces/stabilityai/stable-diffusion))![^1] Gradio also allows you to prototype your web apps in notebooks which allow you to iterate fast. Unfortunately, Hugging Face Spaces requires you to package your web application code as a python script named `app.py`.
2016

2117
However, **thanks to [nbdev](https://nbdev.fast.ai), you can deploy a Gradio app to Spaces from a notebook without having to refactor your code into a script!** When you finish this tutorial, you will have an app that looks like this:
2218

@@ -207,4 +203,8 @@ After a couple of minutes, you will see your app published! This app is publish
207203
Hopefully you felt something magical while doing this example. Even though the target application required you to write a python script (`app.py`), you didn't have to refactor your script from a notebook! I believe that you shouldn't have to refactor your code and switch contexts even when creating python packages! If this intrigues you, check out [nbdev](https://nbdev.fast.ai/blog/posts/2022-07-28-nbdev2/)
208204

209205

210-
[^1]: The prompt that generated the cover image is: "A data scientist at a computer in a futuristic city with a view of the planet Jupyter in the night sky, trending on artstation, high detail, science-fiction"
206+
:::{.fn-hide-back}
207+
208+
[^1]: The prompt that generated the cover image is: "A data scientist at a computer in a futuristic city with a view of the planet Jupyter in the night sky, trending on artstation, high detail, science-fiction"
209+
210+
:::

nbs/styles.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,4 @@ blockquote > pre {
5454
.figure-caption {
5555
font-size: 75%;
5656
font-style: italic;
57-
}
58-
59-
.hide {
60-
display:none;
6157
}

0 commit comments

Comments
 (0)