Skip to content

Commit

Permalink
Allow developers to run GraXpert without s3_secrets.py
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-ring authored and schmelly committed Dec 30, 2023
1 parent b05b99e commit 1a3baa7
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions graxpert/ai_model_handling.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,22 @@
from minio import Minio
from packaging import version

from graxpert.s3_secrets import bucket_name, endpoint, ro_access_key, ro_secret_key
try:
from graxpert.s3_secrets import bucket_name, endpoint, ro_access_key, ro_secret_key
client = Minio(endpoint, ro_access_key, ro_secret_key)
except Exception as e:
logging.exception(e)
client = None

from graxpert.ui.loadingframe import DynamicProgressThread

ai_models_dir = os.path.join(user_data_dir(appname="GraXpert"), "ai-models")
os.makedirs(ai_models_dir, exist_ok=True)

client = Minio(endpoint, ro_access_key, ro_secret_key)


# ui operations
def list_remote_versions():
if client is None:
return []
try:
objects = client.list_objects(bucket_name)
versions = []
Expand Down

0 comments on commit 1a3baa7

Please sign in to comment.