Spaces:
Runtime error
Runtime error
bethecloud
commited on
Commit
•
e63a5af
1
Parent(s):
1b03567
Update app.py
Browse files
app.py
CHANGED
@@ -7,10 +7,10 @@ import tempfile
|
|
7 |
import boto3
|
8 |
from botocore.exceptions import NoCredentialsError
|
9 |
|
10 |
-
#
|
11 |
-
s3_access_key = "
|
12 |
-
s3_secret_key = "
|
13 |
-
s3_endpoint =
|
14 |
|
15 |
# Initialize Storj with boto3
|
16 |
s3 = boto3.client(
|
@@ -70,4 +70,4 @@ iface = gr.Interface(
|
|
70 |
theme=storj_theme # Pass the theme to the Interface
|
71 |
)
|
72 |
|
73 |
-
iface.launch(share=
|
|
|
7 |
import boto3
|
8 |
from botocore.exceptions import NoCredentialsError
|
9 |
|
10 |
+
# Read S3 keys from environment variables
|
11 |
+
s3_access_key = os.environ["S3_ACCESS_KEY"]
|
12 |
+
s3_secret_key = os.environ["S3_SECRET_KEY"]
|
13 |
+
s3_endpoint = os.environ["S3_ENDPOINT"]
|
14 |
|
15 |
# Initialize Storj with boto3
|
16 |
s3 = boto3.client(
|
|
|
70 |
theme=storj_theme # Pass the theme to the Interface
|
71 |
)
|
72 |
|
73 |
+
iface.launch(share=False, debug=True) # Set share to False when deploying to Hugging Face Spaces
|