Skip to content

Commit

Permalink
Merge pull request #649 from IAHispano/formatter-main
Browse files Browse the repository at this point in the history
chore(format): run black on main
  • Loading branch information
blaisewf authored Aug 29, 2024
2 parents 03e3c00 + 1435dae commit 5fedb74
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions tabs/download/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,20 @@ def fetch_pretrained_data():
)
os.makedirs(pretraineds_custom_path, exist_ok=True)
try:
with open(os.path.join(pretraineds_custom_path, json_url.split("/")[-1]), 'r') as f:
data=json.load(f)
with open(
os.path.join(pretraineds_custom_path, json_url.split("/")[-1]), "r"
) as f:
data = json.load(f)
except:
try:
response = requests.get(json_url)
response.raise_for_status()
data = response.json()
with open(os.path.join(pretraineds_custom_path, json_url.split("/")[-1]), 'w', encoding="utf-8") as f:
with open(
os.path.join(pretraineds_custom_path, json_url.split("/")[-1]),
"w",
encoding="utf-8",
) as f:
json.dump(
data,
f,
Expand All @@ -94,7 +100,11 @@ def fetch_pretrained_data():
ensure_ascii=False,
)
except:
data = {"Titan": {"32k": {"D": "null", "G": "null"},},}
data = {
"Titan": {
"32k": {"D": "null", "G": "null"},
},
}
return data


Expand Down

0 comments on commit 5fedb74

Please sign in to comment.