You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Contributed by <ahref="https://huggingface.co/osanseviero">Omar Sanseviero</a> 🦙
6
+
Contributed by <ahref="https://huggingface.co/osanseviero">Omar Sanseviero</a> 🦙 and <ahref="https://huggingface.co/farukozderim">Ömer Faruk Özdemir</a>
7
7
8
8
## Introduction
9
9
@@ -140,6 +140,31 @@ iface3.launch()
140
140
141
141
Although both models are generative, you can see that the way both models behave is very different. That's a powerful application of `Parallel`!
142
142
143
+
## Creating Spaces with python
144
+
145
+
Making use of the [huggingface_hub client library](https://huggingface.co/docs/huggingface_hub/index) library you can create new Spaces or model repositories. You can do this even in a Gradio Space! You can find an example space [here](https://huggingface.co/spaces/farukozderim/Model-Comparator-Space-Builder). This Space creates a new Space comparing different models or spaces with the support of Gradio `load` and `Parallel`. Now you can try creating cool spaces with all kinds of functionality 😎.
Here, `create_repo` creates a gradio repo with the target name under a specific account using that account's Write Token. `repo_name` gets the full repo name of the related repo. Finally `upload_file` uploads a file inside the repo with the name `app.py`.
Throughout this guide, you've seen there are Gradio demos embedded. You can also do this on own website! The first step is to create a Space with the demo you want to showcase. You can embed it in your HTML code, as shown in the following self-contained example.
@@ -158,4 +183,4 @@ That's it! Let's recap what you can do:
158
183
4. Combine multiple Spaces by running them sequentially or parallelly.
0 commit comments