I am currently developing an Android and iOS application that uses Machine Learning.
This app sends data from the mobile application to the server(most probably Firebase).
Meanwhile, the machine learning model would be pre-trained using Python.
In order for this application to work, the data sent from the mobile app should be sent to Python from the server. After the data goes into the pre-trained model, a specific output would be produced and the output would be sent back to the mobile app.
However, there would be a huge memory usage as Python should be infinitely run to retrieve the updated data from Firebase.
Is it possible to send data from Firebase to Python and mobile applications once data has been updated in the Firebase? If it is not possible in Firebase, are there any other servers that can implement this function?
Thank you.
Is it possible to send data from Firebase to Python and mobile applications once data has been updated in the Firebase?
Yes it is possible you have to set up Firebase Admin SDK, check documentation here.
Related
I am trying to create a python program that takes input of what homework assignments I have and stores all of that information so that I can send a notification to my phone when assignments are coming up. I want to be able to give input from my phone throughout the day and cant seem to find a way to interact with my script on my computer from my phone. Any ideas? Ps: if you know a way that I can send notifications to my phone that would also be cool.
It looks like you should create a classic client/server architecture. This is quite a big task. Your program running on your Windows computer acts as a server waiting for client (mobile application) requests. I propose to create a widely used REST API service using e.g. the Flask framework (server side) and use the Retrofit framework for the Android application.
Remember that when using the application on the Internet, you will have to ensure the availability of the server.
To send notifications from the server to the app, use Firebase Cloud Messaging
Let us assume that, I have a Machine Learning model which uses the Tensorflow library and performs a function.
And of course, the function requires input and provides some output. Which can be easily done on my terminal.
Here comes the area where I need help, IO in the terminal is not what I wanted, I want to create a web application that has multiple functionalities. Let us only consider the area where my ML model has to work, say when I click a button after entering the inputs it runs the ML model back and provides me an output which I could display it on my web application.
I can develop websites with NodeJs. Is there any possibility of integrating the ML model with my web application made of NodeJs?
I tried running on some packages like child-process,python-shell nothing works, it gives me an error when it comes to the place of importing packages.
Please give me suggestions on the Integration of the ML model with a NodeJS web application using MongoDB as a database. All I wanted is that my web application runs my ML model wherever necessary to obtain the results which I can display through my web applications.
Also, provide information about technologies that can be easily integrated with the Machine learning model.
I'm also encountering similar problems.
Further to the previous reply, I would go for the micro services architecture design.
E.g. Use a node.js app to serve the front-end request, and the Python server only to serve the machine learning tasks.
You need to build a python web application around your model to serve responses (your model’s output) to the client (the webpage your nodejs app is serving).
Flask and Django are the major players there. REST is the most popular meta-framework.
Once you’ve built a REST API around your model, you just query it like any resource via HTTP/xmlhttprequest in JavaScript from your web page.
Or you can try to pickle your model and load into into JavaScript to query from your nodejs app.
Easier than either of those would be to use IBM Cloud Functions or AWS Lambda to expose your script/model. Very easy and cost effective.
I want to integrate a video and text chat for web (python) and mobile (xamarin). The requirement is to make customers able to communicate across platforms i.e mobile to web and vice versa.
Mobile application will be developed using Xamarin technology and the website will be in Python.
Is video supported by both platforms?
Yes it does, check out the vidyo.io Xamarin sample on github - https://github.com/Vidyo/VidyoConnector-xamarin
Note that vidyo.io SDK runs on the client end. That means it will either run on your mobile device (using native libraries or in your case using Xamarin), or in case of web sites it will use javascript. You do not need to integrate vidyo.io SDK on the server side.
On your server, what you will need, is to generate "tokens" whenever your client device or website wants to connect to a video conference.
Since you are using python you can take a look at their sample token generator at https://static.vidyo.io/4.1.16.8/utils/generateToken.py
You can learn more about tokens on their website -
https://developer.vidyo.io/documentation/4-1-16-8/getting-started#Tokens
The tictactoe example from google endpoints have versions for both java and python. These can be used with javascript, android, and iOS clients.
I want to use python endpoint with iOS client, but the source code for the iOS client found on github was written for java backend. What do I need to change for it to work with python endpoint.
Python endpoint: https://github.com/GoogleCloudPlatform/appengine-endpoints-tictactoe-python
iOS client:https://github.com/GoogleCloudPlatform/appengine-endpoints-tictactoe-ios
Update:
I guess I didnt phrase my question clearly, within the python endpoint file for tictactoe. the request is routed to static/js/render.js and static/js/base.js. I was wondering how to do those things with another python file, without going through those javascripts.
I want to know: what is the 'message'(the win or lose data, and what kind of data) is send by iOS to the endpoint. And how would the endpoint find this 'message' and use the api.method to put this 'message' to ndb?
Once you have your backend ready, generating client libs for JS, Android or iOS is straightforward. Don't forget to run the same command in the terminal every time your API code changes (in order to update your client libs).
Here's a step by step guide on how to do it.
I'm developing an application where the user will be able to log in via his Facebook account to use my GAE backend. I know that I have to first create a Facebook session on my iOS device (via the Facebook SDK or SimpleAuth) and pass it to GAE, but how do I do that? I know there is an option to use Lean-Engine, however it is Java based and my app is in Python and the iOS classes aren't quite that ready yet.
I'd like to use the Endpoints API to exchange data between the iOS device and GAE, but apparently it requires to use a Google account to use for login, according to this article. However, this is not as crucial. I want to avoid the user having to fill-in any kind of username/password to log in to the backend application.
How can I achieve this?