Update base/app.py
Browse files- base/app.py +6 -4
base/app.py
CHANGED
@@ -10,6 +10,10 @@ import torchvision
|
|
10 |
import random
|
11 |
from huggingface_hub import snapshot_download
|
12 |
|
|
|
|
|
|
|
|
|
13 |
config_path = "./base/configs/sample.yaml"
|
14 |
args = OmegaConf.load("./base/configs/sample.yaml")
|
15 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
@@ -74,7 +78,7 @@ title = """
|
|
74 |
"""
|
75 |
|
76 |
with gr.Blocks(css='style.css') as demo:
|
77 |
-
gr.Markdown("<font color=red size=10><center>
|
78 |
with gr.Column():
|
79 |
with gr.Row(elem_id="col-container"):
|
80 |
# inputs = [prompt, seed_inp, ddim_steps]
|
@@ -121,6 +125,4 @@ with gr.Blocks(css='style.css') as demo:
|
|
121 |
submit_btn.click(infer, inputs, outputs)
|
122 |
# share_button.click(None, [], [], _js=share_js)
|
123 |
|
124 |
-
demo.queue(max_size=
|
125 |
-
|
126 |
-
|
|
|
10 |
import random
|
11 |
from huggingface_hub import snapshot_download
|
12 |
|
13 |
+
# Login function for authentication
|
14 |
+
def custom_auth(username, password):
|
15 |
+
return password == "aitutor"
|
16 |
+
|
17 |
config_path = "./base/configs/sample.yaml"
|
18 |
args = OmegaConf.load("./base/configs/sample.yaml")
|
19 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
|
78 |
"""
|
79 |
|
80 |
with gr.Blocks(css='style.css') as demo:
|
81 |
+
gr.Markdown("<font color=red size=10><center>Pixio Text-to-Video generation</center></font>")
|
82 |
with gr.Column():
|
83 |
with gr.Row(elem_id="col-container"):
|
84 |
# inputs = [prompt, seed_inp, ddim_steps]
|
|
|
125 |
submit_btn.click(infer, inputs, outputs)
|
126 |
# share_button.click(None, [], [], _js=share_js)
|
127 |
|
128 |
+
demo.queue(max_size=18).launch(auth=custom_auth)
|
|
|
|