Spaces:
Runtime error
Runtime error
Commit ·
c5abf80
1
Parent(s): 61a659b
Update app.py
Browse files
app.py
CHANGED
|
@@ -52,10 +52,10 @@ demo = gr.Interface(
|
|
| 52 |
examples=[["example.png"], ["example_1.png"],["example_2.png"], ["example_3.png"],["example_4.png"],["example_5.png"]],
|
| 53 |
cache_examples=False)
|
| 54 |
|
| 55 |
-
|
| 56 |
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
|
|
|
| 52 |
examples=[["example.png"], ["example_1.png"],["example_2.png"], ["example_3.png"],["example_4.png"],["example_5.png"]],
|
| 53 |
cache_examples=False)
|
| 54 |
|
| 55 |
+
credentials_json = os.environ.get("CREDENTIALS")
|
| 56 |
|
| 57 |
+
if credentials_json is None:
|
| 58 |
+
print("Error: Please set the CREDENTIALS")
|
| 59 |
+
else:
|
| 60 |
+
credentials = json.loads(credentials_json)
|
| 61 |
+
demo.launch(auth=credentials)
|