Spaces:
Build error
Build error
Add api_key for loading private model (#5)
Browse files- Add api_key for loading private model (1b9fb7544d799c42206bbc5b579a8ceb06038abf)
Co-authored-by: Radamés Ajna <radames@users.noreply.huggingface.co>
- template/app_simple.py +4 -0
template/app_simple.py
CHANGED
@@ -1,5 +1,8 @@
|
|
|
|
1 |
import gradio as gr
|
2 |
|
|
|
|
|
3 |
article = """---
|
4 |
This space was created using [SD Space Creator](https://huggingface.co/spaces/anzorq/sd-space-creator)."""
|
5 |
|
@@ -8,4 +11,5 @@ gr.Interface.load(
|
|
8 |
title="""$title""",
|
9 |
description="""$description""",
|
10 |
article=article,
|
|
|
11 |
).queue(concurrency_count=20).launch()
|
|
|
1 |
+
import os
|
2 |
import gradio as gr
|
3 |
|
4 |
+
API_KEY=os.environ.get('HUGGING_FACE_HUB_TOKEN', None)
|
5 |
+
|
6 |
article = """---
|
7 |
This space was created using [SD Space Creator](https://huggingface.co/spaces/anzorq/sd-space-creator)."""
|
8 |
|
|
|
11 |
title="""$title""",
|
12 |
description="""$description""",
|
13 |
article=article,
|
14 |
+
api_key=API_KEY,
|
15 |
).queue(concurrency_count=20).launch()
|