bethecloud commited on
Commit
e63a5af
1 Parent(s): 1b03567

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -7,10 +7,10 @@ import tempfile
7
  import boto3
8
  from botocore.exceptions import NoCredentialsError
9
 
10
- # Hardcoded S3 keys
11
- s3_access_key = "juj22qxqxql7u2pl6nomgxu3ip7a"
12
- s3_secret_key = "j3uwidtozhboy5vczhymhzkkjsaumznnqlzck5zjs5qxgsung4ukk"
13
- s3_endpoint = "https://gateway.storjshare.io"
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=True, debug=True)
 
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