Auth from secret keys
Browse files- app.py +3 -3
- requirements.txt +1 -2
app.py
CHANGED
@@ -3,12 +3,12 @@ import gradio as gr
|
|
3 |
import numpy as np
|
4 |
import random
|
5 |
import os
|
6 |
-
from dotenv import load_dotenv
|
7 |
from diffusers import AutoPipelineForText2Image
|
8 |
import torch
|
9 |
from huggingface_hub import snapshot_download
|
10 |
|
11 |
-
|
|
|
12 |
|
13 |
snapshot_download(repo_id="Roomie/xavyy", cache_dir='./')
|
14 |
|
@@ -139,4 +139,4 @@ with gr.Blocks(css=css) as demo:
|
|
139 |
outputs=[result]
|
140 |
)
|
141 |
|
142 |
-
demo.queue().launch()
|
|
|
3 |
import numpy as np
|
4 |
import random
|
5 |
import os
|
|
|
6 |
from diffusers import AutoPipelineForText2Image
|
7 |
import torch
|
8 |
from huggingface_hub import snapshot_download
|
9 |
|
10 |
+
SPACE_USERNAME = os.getenv('SPACE_USERNAME')
|
11 |
+
SPACE_PASSWORD = os.getenv('SPACE_PASSWORD')
|
12 |
|
13 |
snapshot_download(repo_id="Roomie/xavyy", cache_dir='./')
|
14 |
|
|
|
139 |
outputs=[result]
|
140 |
)
|
141 |
|
142 |
+
demo.queue().launch(auth=(SPACE_USERNAME, SPACE_PASSWORD))
|
requirements.txt
CHANGED
@@ -6,5 +6,4 @@ transformers
|
|
6 |
xformers
|
7 |
sentencepiece
|
8 |
peft
|
9 |
-
spaces
|
10 |
-
python-dotenv
|
|
|
6 |
xformers
|
7 |
sentencepiece
|
8 |
peft
|
9 |
+
spaces
|
|