Deploying a PDF converter app to serverless
Hey I'm new to runpod, I'd like to run an app that utilizes some OCR models to convert pdf files to a different format. How can i deploy this app on runpod's serverless endpoint? and how do I manage file uploads to the serverless endpoint?
4 Replies
You can't do uploads to a serverless endpoint, you can only do downloads from it.
Here are some resources for getting started with RunPod serverless:
https://blog.runpod.io/serverless-create-a-basic-api/
https://www.youtube.com/@generativelabs/videos
https://trapdoor.cloud/getting-started-with-runpod-serverless/
The serverless endpoint can download files from a URL and can upload the results of the processing, but you can't upload directly to the endpoint.
Okay thanks for the info and resources. I'm still understanding how the handlers work, so I can run any custom code as long as I use the handler as a way to manage the requests and response to the endpoint. Is this correct?
So will it be possible for the serverless endpoint to send back a file to the client?
Yeah you have to use the RunPod SDK to start the handler otherwise you can do whatever you want inside the handler function.
If the file isn't massive you can just base64 encode the data and return it in the JSON response.
By the way this is the wrong channel, should be in #⚡|serverless not #⛅|gpu-cloud .
Ooh sorry.. Thank u so much for the insights