Spaces:
Sleeping
Sleeping
Himanshu-AT
commited on
Commit
·
72cab49
1
Parent(s):
3c57ed2
add password
Browse files
app.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
import gradio as gr
|
2 |
import numpy as np
|
3 |
-
|
4 |
import spaces
|
5 |
import random
|
6 |
# from image_gen_aux import DepthPreprocessor
|
@@ -213,4 +213,11 @@ with gr.Blocks(css=css) as demo:
|
|
213 |
outputs = [result, seed]
|
214 |
)
|
215 |
|
216 |
-
demo.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
import numpy as np
|
3 |
+
import os
|
4 |
import spaces
|
5 |
import random
|
6 |
# from image_gen_aux import DepthPreprocessor
|
|
|
213 |
outputs = [result, seed]
|
214 |
)
|
215 |
|
216 |
+
# demo.launch()
|
217 |
+
password = os.getenv("GRADIO_PASSWORD")
|
218 |
+
|
219 |
+
# Create an authentication object
|
220 |
+
auth = gr.Auth(username="user", password=password)
|
221 |
+
|
222 |
+
# Launch the app with authentication
|
223 |
+
demo.launch(auth=auth)
|