huggingface / swift-transformers

Swift Package to implement a transformers-like API in Swift
Apache License 2.0
708 stars 77 forks source link

the installation guide for SwiftPM #71

Open mzbac opened 8 months ago

mzbac commented 8 months ago

First of all, thank you for creating this awesome library for the community. I was just wondering if it would be possible to add an installation guide so that beginners like me could learn how to install it using SwiftPM. It took me a bit of time to figure out how to install it via SwiftPM.

Something as simple as:

SwiftPM

To use swift-transformers with SwiftPM, you can add this to your Package.swift:

dependencies: [
    .package(url: "https://github.com/huggingface/swift-transformers", from: "0.1.5")
]

and add the libraries as dependencies:

dependencies: [
    .product(name: "Transformers", package: swift-transformers"),
]
pcuenca commented 8 months ago

That's a very good idea, @mzbac! Would you like to open a PR for it? I'd maybe also cover how to use from a Xcode project, not just inside another package. What do you think?

mzbac commented 8 months ago

Yeah, I would love to create a PR, but I am quite new to Swift and Xcode. Do you have any suggestions on how to cover the usage for an Xcode project?

pcuenca commented 7 months ago

Why don't we start with the SwiftPM instructions then? You'd just need to update the README for that. For usage in an Xcode project, you can play with this project to see how it's done. I can help you with that.