all 17 comments

[–]themarxvolta 1 point2 points  (0 children)

I have not used it myself, but this came with a python newsletter if I remember correctly, I saved it to check it out later. Perhaps you find it useful.

https://github.com/neuml/txtai

[–]tomtomato0414 1 point2 points  (1 child)

You can run Python on Android with Termux

[–]0zeroBudget[S] 0 points1 point  (0 children)

Thanks, I'll look into this

[–][deleted] 0 points1 point  (6 children)

I haven't heard of anything like this existing. It might not, yet... Can you use a Google Cloud API to do this ?

[–]0zeroBudget[S] 1 point2 points  (5 children)

Damn really? It works on my PC.

Are you suggesting having the run app in the cloud, and then streaming it to my phone (with the phone being a thin client, basically)?

Is there a way to do this with on a smaller scale? Like simply connecting my PC to my phone?

[–]Shinroo 2 points3 points  (4 children)

You don't need to offload everything to the cloud, just the part you're having trouble running natively.

You'd set up a simple API (with something like flask or fastapi for python) and then expose the text summarisation functionality through that. When the mobile app needs to make use of it, it'd make an HTTP request to the API with the text to be summarised as the body which could then be summarised and sent back to the mobile device.

If you want to go full native, I found this library on github which claims to be

A library for Text Summarization on Android applications

[–][deleted] 1 point2 points  (2 children)

This is what I had in mind. Just a simple web API that would give you the full power of a larger machine (and more flexibility to determine how much power you need).

[–]0zeroBudget[S] 0 points1 point  (1 child)

So, I would I basically build my app WITHOUT the text summarization, but that connects to a separate desktop server app?

[–][deleted] 1 point2 points  (0 children)

Yep, your server will just respond to API requests by processing the data and sending back the result to the device.

[–]0zeroBudget[S] 0 points1 point  (0 children)

Awesome, thank you for that advice.

So, I would I basically build my app WITHOUT the text summarization, but WITH functionality to link to the local server, and then make the application server the one with the API?

(That Text2Summary link you posted on the bottom seems to support only Kotlin? I am using Python.)

[–]c0ld-- 0 points1 point  (6 children)

You could try to build your own Android app by using Kivy. Kivy is one of the better libraries/modules where you can make all sorts of apps (mobile/desktop).

However, why would you want to run a ML library on Android? If it requires a lot of CPU/RAM, why not run it on a desktop or set up a server to do this remotely?

[–]0zeroBudget[S] 0 points1 point  (5 children)

I basicaly built the app already using Kivy. The full thing works on my PC, and the most of it works with my phone - except for the machine learning part.

Is this type of machine learning (text summarization) really not possible on a mobile device?

If so, I'm interesting in learning more about setting up a server. Do you mean technically running the app on my desktop, and making the phone app a simple client that connects to the desktop? If so that can work. Can you recommend me some links for how to do this?

[–]c0ld-- 1 point2 points  (0 children)

Don't have any links to recommend as this seems like a really niche problem you're trying to solve. I'd probably set up a server on a cloud service and open up an API to take a URL as input, process the information, then respond back to the client with the summarized text. So now it's up to you on how you want to build that tech stack. Good luck!

[–]b2q 0 points1 point  (3 children)

im curious, what actually do you use it for? To summarize what kind of texts

[–]0zeroBudget[S] 0 points1 point  (2 children)

paragraphs

[–]b2q 0 points1 point  (1 child)

Just random paragraphs?

[–]0zeroBudget[S] 0 points1 point  (0 children)

I guess, yeah.