Welcome to SlashML#

SlashML is a framework that provides the best performing ML models under one API. This enables the users to rapidly prototype their machine-learning solutions.

Quick Start#

To quickly play around with the model we recommend using the Python SDK client. You can install the client using pip.

pip install slashml

Example - Text To Speech#

from slashml import TextToSpeech

# Replace `API_KEY` with your SlasML API token. This example still runs without
# the API token but usage will be limited
API_KEY = "YOUR_API_KEY"

service_provider = TextToSpeech.ServiceProvider.AWS
input_text = "To be or not to be, that is the question!"

# Find all the service providers that we support by running the choices() method
print(f"Available providers: {TextToSpeech.ServiceProvider.choices()}")
print(f"Selected provider: {service_provider}")

model = TextToSpeech(api_key=API_KEY)

# Submit request
job = model.execute(text=input_text, service_provider=service_provider)

print(f"\n\n\n You can access the audio file here: {job.audio_url}")

Example - Text Summarization#

from slashml import TextSummarization


# Replace `API_KEY` with your SlasML API token. This example still runs without
# the API token but usage will be limited
API_KEY = None
service_provider = TextSummarization.ServiceProvider.OPENAI

input_text = """A good writer doesn't just think, and then write down what he thought, as a sort of transcript. A good writer will almost always discover new things in the process of writing. And there is, as far as I know, no substitute for this kind of discovery. Talking about your ideas with other people is a good way to develop them. But even after doing this, you'll find you still discover new things when you sit down to write. There is a kind of thinking that can only be done by writing."""

model = TextSummarization(api_key=API_KEY)

# Find all the service providers that we support by running the choices() method
print(f"Available providers: {TextSummarization.ServiceProvider.choices()}")
print(f"Selected provider: {service_provider}")

response = model.execute(text=input_text, service_provider=service_provider)

print(f"Summary = {response.summarization_data}")

Example - Speech to Text#

from slashml import SpeechToText

# Replace `API_KEY` with your SlasML API token. This example still runs without
# the API token but usage will be limited
API_KEY = "YOUR_API_KEY"

service_provider = SpeechToText.ServiceProvider.AWS

# we support many formats, including mp3, mp4, wav, etc.
file_path = "test.mp4"

# Find all the service providers that we support by running the choices() method
print(f"Available providers: {SpeechToText.ServiceProvider.choices()}")
print(f"Selected provider: {service_provider}")


model = SpeechToText(api_key=API_KEY)

# Upload audio
uploaded_file = model.upload_audio(file_path)
print(f"file uploaded: {uploaded_file}")

response = model.execute(
    upload_url=uploaded_file["upload_url"], service_provider=service_provider
)

print(f"\n\n\n\nTranscription = {response.transcription_data.transcription}")

Example - Model Deployment#

Examples#

You can find production ready examples here here.

API Token#

There is a daily limit (throttling) on the number of calls the user performs. The code can run without specifying the API key. The throttling kicks in and prevents new jobs after exceeding 10 calls per minute.

If the user intends on using the service more frequently, it is recommended to generate a token or API key from here. You can pass the API key when creating a model, if you don’t the API will still work but you will be throttled.

Deploying the above Examples#

  • Deploy Demos: It takes around 2-5 minutes to deploy our demos.

Python SDK#

Complete documentation on all methods and classes for SlashML.

Python SDK Reference

Model Deployment#

Complete documentation on all methods and classes for SlashML.

Full API Reference#

Models on SlashML can be used in languages other than Python. The full API reference can be found here. If you would like to create a client in another language, please contact us at faizank@slashml.com. We would love to help you out!. 🙏

Use Cases#

This section contains some of the use-cases that we have found for our services.

Additional Resources#

Additional resources we think may be useful as you develop your application!
  • Website: Visit our website to manage your slashml account.

  • Twitter: Follow us on twitter to receive the latest updates!