Skip to content

Commit 40bf0c0

Browse files
Merge remote-tracking branch 'origin/main' into audio-features
2 parents d1e6dc4 + ecb8239 commit 40bf0c0

3 files changed

Lines changed: 14 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
All notable changes to `transformers-php` will be documented in this file.
44

5+
## v0.4.2 - 2024-06-05
6+
7+
### What's Changed
8+
9+
* bugfix: Repository url resolution not working properly in Windows by @CodeWithKyrian in https://github.com/CodeWithKyrian/transformers-php/pull/41
10+
11+
**Full Changelog**: https://github.com/CodeWithKyrian/transformers-php/compare/0.4.1...0.4.2
12+
513
## v0.4.1 - 2024-05-24
614

715
### What's Changed
@@ -110,6 +118,7 @@ composer require codewithkyrian/transformers
110118

111119

112120

121+
113122
```
114123
And you must initialize the library to download neccesary libraries for ONNX
115124

@@ -122,6 +131,7 @@ And you must initialize the library to download neccesary libraries for ONNX
122131

123132

124133

134+
125135
```
126136
#### Checkout the Documentation
127137

@@ -140,6 +150,7 @@ To ensure a smooth user experience, especially with larger models, we recommend
140150

141151

142152

153+
143154
```
144155
#### What's Next?
145156

docs/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ use Codewithkyrian\Transformers\Transformers;
159159
public function boot()
160160
{
161161
Transformers::setup()
162-
->setCacheDir(storage_path('app/transfomers'))
162+
->setCacheDir(storage_path('app/transformers'))
163163
->setRemoteHost('https://yourmodelshost.com')
164164
->setRemotePathTemplate('custom/path/{model}/{file}')
165165
->setAuthToken('your-token')

src/Utils/Hub.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,10 @@ private static function resolveRepositoryURL(string $pathOrRepoID, string $revis
203203

204204
$remotePath = str_replace(
205205
['{model}', '{revision}', '{file}'],
206-
[$pathOrRepoID, $revision, joinPaths($subFolder, $fileName)],
206+
[$pathOrRepoID, $revision, $subFolder === '' ? $fileName : "$subFolder/$fileName"],
207207
Transformers::$remotePathTemplate
208208
);
209209

210-
return joinPaths($remoteHost, $remotePath);
210+
return "$remoteHost/$remotePath";
211211
}
212212
}

0 commit comments

Comments
 (0)